-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makesub.in
48 lines (35 loc) · 950 Bytes
/
Makesub.in
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
# CODYlib -*- mode:Makefile -*-
# Copyright (C) 2019-2020 Nathan Sidwell, nathan@acm.org
# License: Apache v2.0
DOXYGEN := @DOXYGEN@
CXXFLAGS/ := -I$(srcdir)
LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \
resolver.o packet.o server.o
all:: .gdbinit
.gdbinit: gdbinit
rm -f $@ ; ln -s $< $@
clean::
rm -f gdbinit .gdbinit
all:: libcody.a
libcody.a: $(LIBCODY.O)
$(AR) -cr $@ $^
clean::
rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d)
rm -f libcody.a
CXXFLAGS/fatal.cc = -DREVISION='"$(shell cat revision)"' -DSRCDIR='"$(srcdir)"'
fatal.o: Makefile revision
doc:: dox.cfg
ifneq ($(DOXYGEN),:)
cd $(<D); $(DOXYGEN) $(<F) >&dox.log
else
@echo "doxygen not present, documentation not built"
endif
clean::
rm -rf dox dox.log
install::
$(INSTALL) -d $(libdir) $(includedir)
$(INSTALL) libcody.a $(libdir)
$(INSTALL) $(srcdir)/cody.hh $(includedir)
ifeq ($(filter clean%,$(MAKECMDGOALS)),)
-include $(LIBCODY.O:.o=.d)
endif