summaryrefslogtreecommitdiff
path: root/src/Makefile
blob: 241759ae5b4f1c27b6ca84712269a4168c5295fb (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# See COPYING for copyright and license details

include ../config.mk

DEPS=$(patsubst %.o, %.d, $(OBJ))

all: $(TARGET)

$(TARGET): $(OBJ) 
	@echo "$(CC) $@"
	@$(CC) $(OBJ) -o $(TARGET) $(LDFLAGS) 

-include $(OBJ:.o=.d)
-include $(DOBJ:.do=.dd)

%.o: %.c %.h config.h dwb.h tlds.h
	@echo "${CC} $<"
	@$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) 

debug: $(DTARGET)

deps.d: %.c %.h tlds.h 
	@echo "$(CC) -MM $@"
	@$(CC) $(CFLAGS) -MM $< -o $@


%.do: %.c %.h config.h
	@echo "${CC} $<"
	@$(CC) -c -o $@ $< $(DCFLAGS) 

$(DTARGET): $(DOBJ) 
	@echo "$(CC) $@"
	@$(CC) $(DOBJ) -o $(DTARGET) $(LDFLAGS) 

tlds.h: tlds.in mktlds-header
	@echo gen tlds.h
	@./mktlds-header < tlds.in 

domain.o: tlds.h 

domain.do: tlds.h

dependencies: $(DEPS)

deps: 
	$(MAKE) -B dependencies

cgdb: debug
	cgdb $(DTARGET)

clean:
	$(RM) *.o  *.do $(TARGET) $(DTARGET) *.d
	$(RM) tlds.h

.PHONY: clean all cgdb deps