blob: 7e3b51d84aa75b6fe19e9ba29310923825dba4b8 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# $Id: build,v 1.22 2001/10/29 11:22:05 shmit Exp $
#
# Don't do configuration in this file! Edit Makefile.config instead.
#
CFLAGS= ${DEBUGFLAGS} ${PROFFLAGS} ${OSFLAGS} ${OPTFLAGS} \
${THREADFLAGS} ${PATH_DEFS} -I${TOPDIR}/include \
${OBJCINC} ${MYSQL_INCS} ${DB_DEFS} -D_REENTRANT \
-D_THREAD_SAFE
LIBS= ${OSLIBS} -lobjc
# Path settings.
PATH_DEFS= -DDATADIR=\"${DATADIR}\"
# MySQL settings.
MYSQL_LIBS= ${RPATH} -L${MYSQL_LIBDIR} -lmysqlclient -lm
MYSQL_INCS= -I${MYSQL_INCDIR}
DB_DEFS= -DDBUSER=${DBUSER} -DDBPASS=${DBPASS} \
-DDBHOST=${DBHOST} -DDBNAME=${DBNAME} \
-DDBTBL=${DBTBL} -DDBSELECT=${DBSELECT}
BINS= tests/getnast tests/updnast tests/statnast tests/killnast
SBINS= server/nastd
INCS= include/nastd.h
ASSLIBS= client/libnast.a client/libnast_r.a
.SUFFIXES: .c .m .o
.PHONY: common libconfig server client tests perl
all: server client tests perl
install: all
mkdir -p ${BINDIR} ${SBINDIR} ${INCDIR} ${LIBDIR} ${DATADIR}
${INSTALL} -c -m 755 ${BINS} ${BINDIR}
${INSTALL} -c -m 755 ${SBINS} ${SBINDIR}
${INSTALL} -c -m 644 ${INCS} ${INCDIR}
${INSTALL} -c -m 644 ${ASSLIBS} ${LIBDIR}
@(cd perl && ./build ${MAKE} ${PERL} install)
server: common libconfig
@(echo "===> server" && cd server && ${MAKE})
client: common
@(echo "===> client" && cd client && ${MAKE})
tests: common
@(echo "===> tests" && cd tests && ${MAKE})
common:
@(echo "===> common" && cd common && ${MAKE})
libconfig:
@(echo "===> libconfig" && cd libconfig && ${MAKE})
perl:
@(echo "===> perl" && cd perl && ./build ${MAKE} ${PERL})
clean:
@(cd ${TOPDIR} && ${MAKE} realclean)
realclean:
rm -f common/*.o common/*.a client/*.o server/*.o
rm -f tests/*.o tests/getnast
rm -f perl/Makefile perl/NASTD.c perl/NASTD.bs perl/*.o
rm -rf perl/blib
.c.o:
${CC} ${CFLAGS} -c $<
.m.o:
${CC} ${CFLAGS} -c $<
.c.So:
${CC} ${CFLAGS} -fpic -DPIC -o $@ -c $<
MKDIR?= Makefiles
TOPDIR= ${MKDIR}/..
MKLIB= ${TOPDIR}/tools/makelib
MKMODLIST= ${TOPDIR}/tools/mkmodlist
include ${MKDIR}/config
include ${MKDIR}/os/target
|