1: #
2: # (C) 2009 AITnet - Sofia/Bulgaria - <misho@openbsd-bg.org>
3: # by Michael Pounov <misho@openbsd-bg.org>
4: #
5: # $Author: misho $
6: # $Id: Makefile.in,v 1.4.2.5 2014/01/21 15:35:20 misho Exp $
7: #
8:
9: prefix = @prefix@
10: exec_prefix = @exec_prefix@
11: includedir = @includedir@
12: libdir = @libdir@
13:
14: OS = @OS@
15: MACHINE = @MACHINE@
16:
17: CC = @CC@
18: MKDEP = @MKDEP@
19:
20: BIN = ../bin
21: INC = ../inc
22:
23: LDADD = -lelwix
24: CFEXEC_LDADD = ${LDADD} -laitcfg
25: DPATCH_LDADD = ${LDADD} -laitsync -lcrypto
26: DIRER_LDADD = ${LDADD} -lcrypto -laitsync
27: DIRCMP_LDADD = ${LDADD} -lcrypto -laitsync
28: #XMLER_LDADD = ${LDADD} -laitio ${libdir}/libaxl.a ${libdir}/libaxl-ns.a
29: #XMLER_LDADD = ${LDADD} -laitwww -laxl -laxl-ns
30: WDOG_LDADD =
31: ATHCTL_LDADD =
32: DWDS_LDADD = ${LDADD} -laitcfg
33: CFI_LDADD =
34: PCENG_LDADD = ${LDADD} -laitcfg
35: VOUCHER_LDADD = ${LDADD} -lcrypto -laitcfg
36:
37: #CFLAGS = -I. -I${INC} -I${includedir} -I${includedir}/axl @CFLAGS@
38: CFLAGS = -I. -I${INC} -I${includedir} @CFLAGS@
39: LDFLAGS = -L. -L${libdir} -Wl,-R${libdir} @LDFLAGS@
40:
41: SRCS = ${CFEXEC_SRCS} ${UPDIMG_SRCS} ${GET1STETH_SRCS} ${DPATCH_SRCS} \
42: ${DIRER_SRCS} ${DIRCMP_SRCS} ${WDOG_SRCS} \
43: ${VOUCHER_SRCS}
44: PROG = ${CFEXEC_PROG} ${UPDIMG_PROG} ${GET1STETH_PROG} ${DPATCH_PROG} \
45: ${DIRER_PROG} ${DIRCMP_PROG} ${WDOG_PROG} \
46: ${VOUCHER_PROG}
47:
48: .if ${MACHINE} == "i386" && ${OS} == "FreeBSD"
49: SRCS += ${PCENG_SRCS}
50: PROG += ${PCENG_PROG}
51: .endif
52:
53: CFEXEC_SRCS = cfexec.c
54: CFEXEC_OBJS = cfexec.o compile.o
55: CFEXEC_PROG = cfexec
56:
57: UPDIMG_SRCS = updimg.c upd.c
58: UPDIMG_OBJS = updimg.o compile.o upd.o
59: UPDIMG_PROG = updimg
60:
61: GET1STETH_SRCS = get1steth.c
62: GET1STETH_OBJS = get1steth.o compile.o
63: GET1STETH_PROG = get1steth
64:
65: DPATCH_SRCS = dpatch.c
66: DPATCH_OBJS = dpatch.o compile.o
67: DPATCH_PROG = dpatch
68:
69: DIRER_SRCS = direr.c
70: DIRER_OBJS = direr.o compile.o
71: DIRER_PROG = direr
72:
73: DIRCMP_SRCS = dircmp.c
74: DIRCMP_OBJS = dircmp.o compile.o
75: DIRCMP_PROG = dircmp
76:
77: XMLER_SRCS = xmler.c
78: XMLER_OBJS = xmler.o compile.o
79: XMLER_PROG = xmler
80:
81: WDOG_SRCS = wdog.c
82: WDOG_OBJS = wdog.o compile.o
83: WDOG_PROG = wdog
84:
85: ATHCTL_SRCS = athctl.c
86: ATHCTL_OBJS = athctl.o compile.o
87: ATHCTL_PROG = athctl
88:
89: DWDS_SRCS = dwds.c vap.c
90: DWDS_OBJS = dwds.o compile.o vap.o
91: DWDS_PROG = dwds
92:
93: CFI_SRCS = cfi.c
94: CFI_OBJS = cfi.o compile.o
95: CFI_PROG = cfi
96:
97: PCENG_SRCS = pceng.c pceng_run.c
98: PCENG_OBJS = pceng.o compile.o pceng_run.o
99: PCENG_PROG = pceng
100:
101: VOUCHER_SRCS = voucher.c
102: VOUCHER_OBJS = voucher.o compile.o
103: VOUCHER_PROG = voucher
104:
105:
106: all: depend \
107: ${PROG} \
108: ${OS}
109:
110: FreeBSD: ${ATHCTL_PROG} ${DWDS_PROG} ${CFI_PROG}
111:
112: OpenBSD:
113:
114: NetBSD:
115:
116: .c.o: ${SRCS} compile.c
117: ${CC} -c ${CFLAGS} $<
118:
119: depend:
120: ./compile.sh
121: ${MKDEP} ${CFLAGS} ${SRCS}
122:
123: clean:
124: rm -f *.o .depend compile.c *~
125:
126: install:
127:
128: ${CFEXEC_PROG}: ${CFEXEC_OBJS}
129: ${CC} ${LDFLAGS} -o${BIN}/$@ ${CFEXEC_OBJS} ${CFEXEC_LDADD}
130:
131: ${UPDIMG_PROG}: ${UPDIMG_OBJS}
132: ${CC} ${LDFLAGS} -o${BIN}/$@ ${UPDIMG_OBJS}
133:
134: ${GET1STETH_PROG}: ${GET1STETH_OBJS}
135: ${CC} ${LDFLAGS} -o${BIN}/$@ ${GET1STETH_OBJS}
136:
137: ${DPATCH_PROG}: ${DPATCH_OBJS}
138: ${CC} ${LDFLAGS} -o${BIN}/$@ ${DPATCH_OBJS} ${DPATCH_LDADD}
139:
140: ${DIRER_PROG}: ${DIRER_OBJS}
141: ${CC} ${LDFLAGS} -o${BIN}/$@ ${DIRER_OBJS} ${LDADD} ${DIRER_LDADD}
142:
143: ${DIRCMP_PROG}: ${DIRCMP_OBJS}
144: ${CC} ${LDFLAGS} -o${BIN}/$@ ${DIRCMP_OBJS} ${LDADD} ${DIRCMP_LDADD}
145:
146: #${XMLER_PROG}: ${XMLER_OBJS}
147: # ${CC} ${LDFLAGS} -o${BIN}/$@ ${XMLER_OBJS} ${XMLER_LDADD}
148:
149: ${WDOG_PROG}: ${WDOG_OBJS}
150: ${CC} ${LDFLAGS} -o${BIN}/$@ ${WDOG_OBJS} ${WDOG_LDADD}
151:
152: ${ATHCTL_PROG}: ${ATHCTL_OBJS}
153: ${CC} ${LDFLAGS} -o${BIN}/$@ ${ATHCTL_OBJS} ${ATHCTL_LDADD}
154:
155: ${DWDS_PROG}: ${DWDS_OBJS}
156: ${CC} ${LDFLAGS} -o${BIN}/$@ ${DWDS_OBJS} ${DWDS_LDADD}
157:
158: ${CFI_PROG}: ${CFI_OBJS}
159: ${CC} ${LDFLAGS} -o${BIN}/$@ ${CFI_OBJS} ${CFI_LDADD}
160:
161: ${PCENG_PROG}: ${PCENG_OBJS}
162: ${CC} ${LDFLAGS} -o${BIN}/$@ ${PCENG_OBJS} ${PCENG_LDADD}
163:
164: ${VOUCHER_PROG}: ${VOUCHER_OBJS}
165: ${CC} ${LDFLAGS} -o${BIN}/$@ ${VOUCHER_OBJS} ${VOUCHER_LDADD}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>