cmdtree/Makefile -rw-r--r-- 591 bytes View raw
                                                                                
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
33
34
35
36
37
38
39
40
41
42
43
44
45
CFLAGS=-O2 -g -Wall -Werror -I. -Wno-unused-function
LDFLAGS=-lXft -lfontconfig -lX11 
PREFIX ?= /usr/local

BIN=cmdtree

OBJS += drw.o
OBJS += util.o
OBJS += cmdtree.o
OBJS += command.o

OBJS += $(DEPS:.c=.o)

SRCS=$(OBJS:.o=.c)

all: $(SHLIB) $(STATICLIB) $(BIN)

include $(OBJS:.o=.d)

%.d: %.c
	$(CC) -MM $(CFLAGS) $< > $@

cmdtree.c: cfg.h

cfg.h: cfg.def.h
	cp cfg.def.h $@

all: cmdtree

$(BIN): $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@

clean: fake
	rm -f $(OBJS) $(BIN) *.d

install: $(BIN)
	mkdir -p $(PREFIX)/bin
	cp $(BIN) $(PREFIX)/bin

TAGS: fake
	etags *.c

.PHONY: fake