23 lines
292 B
Makefile
23 lines
292 B
Makefile
|
# Toplevel Makefile
|
||
|
|
||
|
SRC := $(wildcard *.c)
|
||
|
CFLAGS := -O2 -Wall
|
||
|
|
||
|
# ############################
|
||
|
|
||
|
all: isync
|
||
|
|
||
|
isync: $(SRC:%.c=%.o)
|
||
|
$(CC) $(CFLAGS) $^ -o $@
|
||
|
|
||
|
%.d: %.c
|
||
|
$(CC) $(CFLAGS) -MM -c $< -o $@
|
||
|
|
||
|
%.o: %.c
|
||
|
$(CC) $(CFLAGS) -o $@ -c $<
|
||
|
|
||
|
clean:
|
||
|
rm -rf *.d *.o isync
|
||
|
|
||
|
-include $(SRC:.c=.d)
|