-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (26 loc) · 1 KB
/
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
rootPath = ./
include ./include.mk
libSources = impl/*.c
libHeaders = inc/*.h
libTests = tests/*.c
testBin = tests/testBin
all: all_libs all_progs
all_libs: externalToolsM ${LIBDIR}/stPinchesAndCacti.a
all_progs: all_libs
${MAKE} ${BINDIR}/stPinchesAndCactiTests
externalToolsM :
cd externalTools && ${MAKE} all
${LIBDIR}/stPinchesAndCacti.a: ${libSources} ${libHeaders} ${LIBDEPENDS} externalToolsM
${CC} ${CPPFLAGS} ${CFLAGS} -c ${libSources}
${AR} rc stPinchesAndCacti.a *.o
${RANLIB} stPinchesAndCacti.a
mv stPinchesAndCacti.a ${LIBDIR}/
cp ${libHeaders} ${LIBDIR}/
${BINDIR}/stPinchesAndCactiTests : ${libTests} ${libSources} ${libHeaders} ${LIBDEPENDS} externalToolsM ${LIBDIR}/3EdgeConnected.a
${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o ${BINDIR}/stPinchesAndCactiTests ${libTests} ${libSources} ${LIBDIR}/3EdgeConnected.a ${LDLIBS}
clean :
cd externalTools && ${MAKE} clean
rm -f *.o
rm -f ${LIBDIR}/stPinchesAndCacti.a ${BINDIR}/stPinchesAndCactiTests
test : all
${BINDIR}/stPinchesAndCactiTests