Makefile (591B)
1 2 CFLAGS=-O2 -g -Wall -Werror -I. -Wno-unused-function 3 LDFLAGS=-lXft -lfontconfig -lX11 4 PREFIX ?= /usr/local 5 6 BIN=cmdtree 7 8 OBJS += drw.o 9 OBJS += util.o 10 OBJS += cmdtree.o 11 OBJS += command.o 12 13 OBJS += $(DEPS:.c=.o) 14 15 SRCS=$(OBJS:.o=.c) 16 17 all: $(SHLIB) $(STATICLIB) $(BIN) 18 19 include $(OBJS:.o=.d) 20 21 %.d: %.c 22 $(CC) -MM $(CFLAGS) $< > $@ 23 24 cmdtree.c: cfg.h 25 26 cfg.h: cfg.def.h 27 cp cfg.def.h $@ 28 29 all: cmdtree 30 31 $(BIN): $(OBJS) 32 $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ 33 34 clean: fake 35 rm -f $(OBJS) $(BIN) *.d 36 37 install: $(BIN) 38 mkdir -p $(PREFIX)/bin 39 cp $(BIN) $(PREFIX)/bin 40 41 TAGS: fake 42 etags *.c 43 44 .PHONY: fake