-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (32 loc) · 807 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
32
33
34
35
36
37
38
39
40
41
42
43
# Making library
PATH1="."
CC=gcc
distroopts=-mtune=generic -Wall -O2
distroheaders=ap_log.h ap_str.h ap_utils.h ap_net/ap_net.h
distrotexts=README LICENSE
optsdebug=-Wall -ggdb -Og
optsrelease=-Wall -O2
libbasename=apstoolkit
outname=lib$(libbasename).a
obj=ap_log.o ap_str.o ap_utils.o
%.o: %.c
$(CC) -c $(OPTS) $< -o $@
# by default we make debug compile
all: OPTS=$(optsdebug)
all: lib compiletests
release: OPTS=$(optsrelease)
release: lib compiletests
doxygen:
rm -rf doxydoc
doxygen Doxyfile
compiletests:
make -C ap_net libname=$(libbasename) OPTS="$(OPTS)" $@
clean:
rm -f *.o $(outname)
make -C ap_error clean
make -C ap_net clean
lib: $(obj)
rm -f $(outname)
make -C ap_net $@ OPTS="$(OPTS)"
make -C ap_error $@ OPTS="$(OPTS)"
ar rcs $(outname) *.o ap_error/*.o ap_net/*.o