-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
31 lines (23 loc) · 811 Bytes
/
Makefile
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
LINK:=$(CXX)
LIBS = -lcrypto
OBJS = obj/bitcoin.o obj/db.o obj/dns.o obj/main.o obj/netbase.o obj/protocol.o obj/util.o
all: dnsseed
-include obj/*.P
obj/dns.o: dns.c
$(CC) -c -pthread -std=c99 -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
obj/%.o: %.cpp
$(CXX) -c -DUSE_IPV6 -pthread -Wno-invalid-offsetof -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
dnsseed: $(OBJS:obj/%=obj/%)
$(LINK) -pthread -o $@ $^ $(LIBS)
clean:
rm -f obj/*.o
rm -f obj/*.P
rm -f dnsseed