blob: d773d530e93737f4785943d86e6bdb1cf2797964 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# User configuration
-include config.mk
SRCFILES := $(wildcard src/*.c)
OBJFILES := $(SRCFILES:%.c=%.o)
DEPFILES := $(OBJFILES:%.o=%.d)
CLEANFILES := $(CLEANFILES) $(DEPFILES) $(OBJFILES) meh
CFLAGS := $(CFLAGS) -O3 -Wall -g -ggdb
LIBS := -lX11 -ljpeg -lpng -lgif
meh: $(OBJFILES)
$(CC) -o $@ $(OBJFILES) $(LIBS)
-include $(DEPFILES)
%.o: %.c Makefile
@echo "CC $<"
@$(CC) $(CFLAGS) -MMD -MP -MT "$*.d" -c -o $@ $<
# Clean
clean:
$(RM) $(CLEANFILES)
.PHONY: clean
|