You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
tiny-json/test/makefile

29 lines
390 B

CC = gcc
CFLAGS = -O3 -std=c99 -Wall -pedantic
src = $(wildcard *.c)
src += $(wildcard ../*.c)
obj = $(src:.c=.o)
dep = $(obj:.o=.d)
.PHONY: build all clean
build: test.exe
all: clean build
clean::
rm -rf $(dep)
rm -rf $(obj)
rm -rf *.exe
test: test.exe
./test.exe
test.exe: $(obj)
gcc $(CFLAGS) -o $@ $^
-include $(dep)
%.d: %.c
$(CC) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@