Workaround makefile

pull/5/head
rafagafe 6 years ago
parent 03ca43a55f
commit 8a225f7ac1
  1. 10
      makefile

@ -2,9 +2,14 @@
CC = gcc
CFLAGS = -std=c99 -Wall -pedantic
src = $(wildcard *.c)
obj = $(src:.c=.o)
dep = $(obj:.o=.d)
build: example-01.exe example-02.exe example-03.exe
clean:
rm -rf *.d
rm -rf *.o
rm -rf *.exe
@ -24,3 +29,8 @@ example-03.exe: example-03.o tiny-json.o
test.exe: tests.o tiny-json.o
gcc $(CFLAGS) -o $@ $^
-include $(dep)
%.d: %.c
$(CC) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
Loading…
Cancel
Save