Annotation of mqtt/src/Makefile, revision 1.2.2.1
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.2.2.1 ! misho 6: # $Id: Makefile,v 1.2 2012/01/27 15:05:38 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.2 misho 22: LIBS = -laitio -laitcfg -lsqlite3
23: LDADD = -laitmqtt -lpthread -laitsched -laitio -laitcfg -lutil -lcrypto
1.1 misho 24:
25: CFLAGS = -I. -I${INC} -I${includedir} -Wall -O2 -fPIC -I/usr/local/include -g -O2
1.2 misho 26: LDFLAGS = -L. -L${LIB} -L${libdir} -L/usr/local/lib
1.1 misho 27:
1.2.2.1 ! misho 28: SRCS = ${MQTTD_SRCS} ${MQTT_SUBS_SRCS} ${MQTT_PUB_SRCS} \
1.2 misho 29: ${MQTTPUB_SRCS} ${MQTTACC_SRCS} ${MQTTLOG_SRCS}
1.2.2.1 ! misho 30: PROGS = ${MQTTD_PROG} ${MQTT_SUBS_PROG} ${MQTT_PUB_PROG} \
1.2 misho 31: ${RTLM_PUB} ${RTLM_ACC} ${RTLM_LOG}
1.1 misho 32:
1.2 misho 33: MQTTD_SRCS = mqttd.c compile.c dl.c utils.c daemon.c mqttd_calls.c
34: MQTTD_OBJS = mqttd.o compile.o dl.o utils.o daemon.o mqttd_calls.o
1.1 misho 35: MQTTD_PROG = mqttd
36:
1.2 misho 37: MQTT_SUBS_SRCS = mqtt_subs.c compile.c client.c
38: MQTT_SUBS_OBJS = mqtt_subs.o compile.o client.o
39: MQTT_SUBS_PROG = mqtt_subs
40:
41: MQTT_PUB_SRCS = mqtt_pub.c compile.c client.c
42: MQTT_PUB_OBJS = mqtt_pub.o compile.o client.o
43: MQTT_PUB_PROG = mqtt_pub
1.1 misho 44:
1.2 misho 45: MQTTPUB_SRCS = pubmqtt.c pub_schema.c
46: MQTTPUB_OBJS = pubmqtt.o pub_schema.o
47: RTLM_PUB = mqtt_pub.so
48:
49: MQTTACC_SRCS = accmqtt.c acc_schema.c
50: MQTTACC_OBJS = accmqtt.o acc_schema.o
51: RTLM_ACC = mqtt_acc.so
52:
53: MQTTLOG_SRCS = logmqtt.c
54: MQTTLOG_OBJS = logmqtt.o
55: RTLM_LOG = mqtt_log.so
56:
1.1 misho 57:
58: all: depend \
59: ${PROGS} \
60:
61: depend:
62: ./compile.sh
63: ${MKDEP} ${CFLAGS} ${SRCS}
64:
65: clean:
1.2 misho 66: rm -f *.o .depend compile.c acc_schema.c pub_schema.c *~
1.1 misho 67:
68: install:
69:
1.2 misho 70: .o: compile.c acc_schema.c pub_schema.c
1.1 misho 71: ${CC} -c ${CFLAGS} $<
72:
73: ${MQTTD_PROG}: ${MQTTD_OBJS}
74: ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTTD_OBJS} ${LDADD}
75:
1.2 misho 76: ${MQTT_SUBS_PROG}: ${MQTT_SUBS_OBJS}
77: ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_SUBS_OBJS} ${LDADD}
78:
79: ${MQTT_PUB_PROG}: ${MQTT_PUB_OBJS}
80: ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_PUB_OBJS} ${LDADD}
81:
82: ${RTLM_PUB}: ${MQTTPUB_OBJS}
83: ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTPUB_OBJS} ${LIBS}
84:
85: ${RTLM_ACC}: ${MQTTACC_OBJS}
86: ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTACC_OBJS} ${LIBS}
87:
88: ${RTLM_LOG}: ${MQTTLOG_OBJS}
89: ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLOG_OBJS}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>