Annotation of mqtt/src/Makefile, revision 1.1.1.1.2.11
1.1 misho 1: #
2: # (C) 2011 AITnet - Sofia/Bulgaria - <misho@openbsd-bg.org>
3: # by Michael Pounov <misho@elwix.org>
4: #
5: # $Author: misho $
1.1.1.1.2.11! misho 6: # $Id: Makefile,v 1.1.1.1.2.10 2011/11/30 00:12:30 misho Exp $
1.1 misho 7: #
8: prefix = /usr/local
9: exec_prefix = ${prefix}
10: includedir = ${prefix}/include
11: libdir = ${exec_prefix}/lib
12:
13: AR = ar
14: RANLIB = ranlib
15: CC = gcc
16: MKDEP = mkdep
17:
18: BIN = ../bin
19: INC = ../inc
20: LIB = ../lib
21:
1.1.1.1.2.7 misho 22: LIBS = -laitio -laitcfg -lsqlite3
23: LDADD = -laitmqtt ${LIBS}
1.1 misho 24:
25: CFLAGS = -I. -I${INC} -I${includedir} -Wall -O2 -fPIC -I/usr/local/include -g -O2
26: LDFLAGS = -L. -L${LIB} -L${libdir} -L/usr/local/lib
27:
1.1.1.1.2.8 misho 28: SRCS = ${MQTTLIB_SRCS} ${MQTTD_SRCS} ${MQTT_SRCS} ${MQTTPUB_SRCS} ${MQTTACC_SRCS} ${MQTTLOG_SRCS}
29: PROGS = ${LIBA} ${LIBSO} ${MQTTD_PROG} ${MQTT_PROG} ${RTLM_PUB} ${RTLM_ACC} ${RTLM_LOG}
1.1 misho 30:
1.1.1.1.2.11! misho 31: MQTTD_SRCS = mqttd.c compile.c dl.c utils.c daemon.c
! 32: MQTTD_OBJS = mqttd.o compile.o dl.o utils.o daemon.o
1.1 misho 33: MQTTD_PROG = mqttd
34:
1.1.1.1.2.7 misho 35: MQTT_SRCS = mqtt.c compile.c dl.c
36: MQTT_OBJS = mqtt.o compile.o dl.o
1.1 misho 37: MQTT_PROG = mqtt
38:
1.1.1.1.2.4 misho 39: MQTTLIB_SRCS = aitmqtt.c conn.c pub.c sub.c recv.c
40: MQTTLIB_OBJS = aitmqtt.o conn.o pub.o sub.o recv.o
1.1 misho 41: LIBA = libaitmqtt.a
42: LIBSO = libaitmqtt.so
43:
1.1.1.1.2.9 misho 44: MQTTPUB_SRCS = pubmqtt.c pub_schema.c
45: MQTTPUB_OBJS = pubmqtt.o pub_schema.o
1.1.1.1.2.6 misho 46: RTLM_PUB = mqtt_pub.so
47:
1.1.1.1.2.9 misho 48: MQTTACC_SRCS = accmqtt.c acc_schema.c
49: MQTTACC_OBJS = accmqtt.o acc_schema.o
1.1.1.1.2.6 misho 50: RTLM_ACC = mqtt_acc.so
1.1.1.1.2.5 misho 51:
1.1.1.1.2.8 misho 52: MQTTLOG_SRCS = logmqtt.c
53: MQTTLOG_OBJS = logmqtt.o
54: RTLM_LOG = mqtt_log.so
55:
1.1 misho 56:
57: all: depend \
58: ${PROGS} \
59:
60: depend:
61: ./compile.sh
62: ${MKDEP} ${CFLAGS} ${SRCS}
63:
64: clean:
1.1.1.1.2.9 misho 65: rm -f *.o .depend compile.c acc_schema.c pub_schema.c *~
1.1 misho 66:
67: install:
68:
1.1.1.1.2.9 misho 69: .o: compile.c acc_schema.c pub_schema.c
1.1 misho 70: ${CC} -c ${CFLAGS} $<
71:
72: ${LIBA}: ${MQTTLIB_OBJS}
73: ${AR} -rc ${LIB}/$@ ${MQTTLIB_OBJS}
74: ${RANLIB} ${LIB}/$@
75:
76: ${LIBSO}: ${MQTTLIB_OBJS}
1.1.1.1.2.7 misho 77: ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLIB_OBJS}
1.1 misho 78:
79: ${MQTTD_PROG}: ${MQTTD_OBJS}
80: ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTTD_OBJS} ${LDADD}
81:
82: ${MQTT_PROG}: ${MQTT_OBJS}
83: ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_OBJS} ${LDADD}
1.1.1.1.2.5 misho 84:
1.1.1.1.2.6 misho 85: ${RTLM_PUB}: ${MQTTPUB_OBJS}
1.1.1.1.2.7 misho 86: ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTPUB_OBJS} ${LIBS}
1.1.1.1.2.6 misho 87:
88: ${RTLM_ACC}: ${MQTTACC_OBJS}
1.1.1.1.2.7 misho 89: ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTACC_OBJS} ${LIBS}
1.1.1.1.2.8 misho 90:
91: ${RTLM_LOG}: ${MQTTLOG_OBJS}
92: ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLOG_OBJS}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>