blob: bc9c88c38f8ba84054b514f331eae56fa8a4fb66 (
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
27
28
29
30
31
32
|
SRCFILES := $(wildcard src/*.c)
OBJFILES := $(SRCFILES:%.c=%.o)
DEPFILES := $(OBJFILES:%.o=%.d)
CLEANFILES := $(CLEANFILES) $(DEPFILES) $(OBJFILES) meh
LIBS ?= -lX11 -lXext -ljpeg -lpng -lgif
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
# User configuration
CONFIG ?= ../config
-include configs/$(CONFIG).mk
CFLAGS ?= -O3
meh: $(OBJFILES)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJFILES) $(LIBS)
-include $(DEPFILES)
%.o: %.c Makefile
$(CC) $(CFLAGS) -MMD -MP -MT "$*.d" -c -o $@ $<
install:
install -Dm 755 meh $(BINDIR)
# Clean
clean:
$(RM) $(CLEANFILES)
.PHONY: clean
|