-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.macros
113 lines (85 loc) · 2.03 KB
/
Makefile.macros
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# server-reg makefile common macros
# Filesystem location of installed site
DEST=/www/server-reg
# URL base of app
URL=/server-reg
# Filesystem location of source
SRC=/data/local/src/server-reg
# --------------------------------------------------
CC=cc
ECPG=/usr/local/pgversion/bin/ecpg
INSTALL=/usr/bin/install
# server-reg library defs
# webtpl compiled in
SRLIB=-L$(SRC)/lib -lsrtools
SRINC=-I$(SRC)/lib -Iwebtpl
SRDEP=$(SRC)/lib/libsrtools.a \
$(SRC)/lib/db.h \
$(SRC)/lib/util.h \
$(SRC)/lib/srext.h \
$(SRC)/lib/srgr.h \
$(SRC)/lib/ks.h
LDAPLIB=-L/usr/local/lib -lldap_r -llber -lsasl2 -lpthread
LDAPINC=-I/usr/local/include
COMMON_LIBS= \
-L/usr/local/lib \
-L/usr/kerberos/lib \
$(LDAPLIB) \
-lssl \
-lcrypto -ldl -lz -lresolv
COMMON_INCL= \
$(SRINC) -I/usr/kerberos/include $(LDAPINC) \
-I/usr/local/include
# --------------------------------------------------
.SUFFIXES: .c .pgc .o
# .pgc.c:
# $(ECPG) $<
.pgc.c:
$(ECPG) $(@:.c=.pgc)
.c.o:
$(CC) -c $(CFLAGS) $(@:.o=.c)
all: all-sub all-local
all-sub:
@ if [ -n "$(SUBDIRS)" ]; then \
for d in $(SUBDIRS); do \
if [ -d $$d ]; then \
echo "Making all in $$d"; \
( cd $$d; make all ); \
fi \
done; \
fi
install-prog: $(PROG)
@ for f in $(PROG); do \
if [ $$f -nt $(SUBDEST)/$$f ]; \
then \
echo "Installing $$f"; \
$(INSTALL) -D -o root -g nobody -m 755 $$f $(SUBDEST)/$$f; \
fi; \
done
install-data: $(DATA)
@ for f in $(DATA); do \
if [ $$f -nt $(SUBDEST)/$$f ]; \
then \
echo "Installing $$f"; \
$(INSTALL) -D -o root -g nobody -m 644 $$f $(SUBDEST)/$$f; \
fi; \
done
install-sub:
@ if [ -n "$(SUBDIRS)" ]; then \
for d in $(SUBDIRS); do \
if [ -d $$d ]; then \
echo "Making install in $$d"; \
( cd $$d; make install ); \
fi \
done; \
fi
clean: clean-sub clean-local
clean-local:
@ rm -f *.o $(PROG)
clean-sub:
@ if [ -n "$(SUBDIRS)" ]; then \
for d in $(SUBDIRS); do \
echo "Making clean in $$d"; \
( cd $$d; make clean ); \
done; \
fi