treebird/Makefile
me@ow.nekobit.net e4a001837a File to C converter
FossilOrigin-Name: 5e9f20ef0e8855e5e57cabc6ce2b3e06c652faae04a5a3a82cd0ffed708b8f7e
2022-01-16 22:43:16 +00:00

23 lines
401 B
Makefile

CC ?= cc
CFLAGS = -Wall
LDFLAGS = -lcurl
SRC = $(wildcard src/*.c)
OBJ = $(patsubst %.c,%.o,$(SRC))
DIST = dist/
TARGET = ratfe.cgi
all: $(TARGET)
$(TARGET): filec $(OBJ)
$(CC) -o $(DIST)$(TARGET) $(LDFLAGS) $(OBJ)
$(OBJ): $(SRC)
$(CC) $(CFLAGS) -c $< -o $@
filec: src/file-to-c/main.o
$(CC) -o file-to-c $<
src/file-to-c/main.o: src/file-to-c/main.c
$(CC) $(CFLAGS) -c $< -o $@
.PHONY: all