version 1.1, 2012/07/03 12:12:37
|
version 1.2, 2012/07/03 12:46:00
|
Line 0
|
Line 1
|
|
# |
|
# (C) 2011 AITnet - Sofia/Bulgaria - <misho@openbsd-bg.org> |
|
# by Michael Pounov <misho@elwix.org> |
|
# |
|
# $Author$ |
|
# $Id$ |
|
# |
|
prefix = @prefix@ |
|
exec_prefix = @exec_prefix@ |
|
includedir = @includedir@ |
|
libdir = @libdir@ |
|
|
|
AR = @AR@ |
|
CC = @CC@ |
|
MKDEP = @MKDEP@ |
|
RANLIB = @RANLIB@ |
|
|
|
BIN = ../bin |
|
INC = ../inc |
|
LIB = ../lib |
|
|
|
LIBS = -laitio -laitcrc -laitcfg -lsqlite3 |
|
LDADD = -laitmqtt -lpthread -laitsched -laitio -laitcfg -laitcrc -lutil -lcrypto |
|
|
|
CFLAGS = -I. -I${INC} @CFLAGS@ |
|
LDFLAGS = -L. -L${LIB} @LDFLAGS@ |
|
|
|
SRCS = ${MQTTD_SRCS} ${MQTT_SUBS_SRCS} ${MQTT_PUB_SRCS} ${MQTT_PING_SRCS} \ |
|
${MQTTPUB_SRCS} ${MQTTACC_SRCS} ${MQTTLOG_SRCS} |
|
PROGS = ${MQTTD_PROG} ${MQTT_SUBS_PROG} ${MQTT_PUB_PROG} ${MQTT_PING_PROG} \ |
|
${RTLM_PUB} ${RTLM_ACC} ${RTLM_LOG} |
|
|
|
MQTTD_SRCS = mqttd.c compile.c dl.c utils.c daemon.c mqttd_calls.c |
|
MQTTD_OBJS = mqttd.o compile.o dl.o utils.o daemon.o mqttd_calls.o |
|
MQTTD_PROG = mqttd |
|
|
|
MQTT_SUBS_SRCS = mqtt_subs.c compile.c client.c |
|
MQTT_SUBS_OBJS = mqtt_subs.o compile.o client.o |
|
MQTT_SUBS_PROG = mqtt_subs |
|
|
|
MQTT_PUB_SRCS = mqtt_pub.c compile.c client.c |
|
MQTT_PUB_OBJS = mqtt_pub.o compile.o client.o |
|
MQTT_PUB_PROG = mqtt_pub |
|
|
|
MQTT_PING_SRCS = mqtt_ping.c compile.c client.c |
|
MQTT_PING_OBJS = mqtt_ping.o compile.o client.o |
|
MQTT_PING_PROG = mqtt_ping |
|
|
|
MQTTPUB_SRCS = pubmqtt.c pub_schema.c |
|
MQTTPUB_OBJS = pubmqtt.o pub_schema.o |
|
RTLM_PUB = mqtt_pub.so |
|
|
|
MQTTACC_SRCS = accmqtt.c acc_schema.c |
|
MQTTACC_OBJS = accmqtt.o acc_schema.o |
|
RTLM_ACC = mqtt_acc.so |
|
|
|
MQTTLOG_SRCS = logmqtt.c |
|
MQTTLOG_OBJS = logmqtt.o |
|
RTLM_LOG = mqtt_log.so |
|
|
|
|
|
all: depend \ |
|
${PROGS} \ |
|
|
|
depend: |
|
./compile.sh |
|
${MKDEP} ${CFLAGS} ${SRCS} |
|
|
|
clean: |
|
rm -f *.o .depend compile.c acc_schema.c pub_schema.c *~ |
|
|
|
install: |
|
|
|
.o: compile.c acc_schema.c pub_schema.c |
|
${CC} -c ${CFLAGS} $< |
|
|
|
${MQTTD_PROG}: ${MQTTD_OBJS} |
|
${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTTD_OBJS} ${LDADD} |
|
|
|
${MQTT_SUBS_PROG}: ${MQTT_SUBS_OBJS} |
|
${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_SUBS_OBJS} ${LDADD} |
|
|
|
${MQTT_PUB_PROG}: ${MQTT_PUB_OBJS} |
|
${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_PUB_OBJS} ${LDADD} |
|
|
|
${MQTT_PING_PROG}: ${MQTT_PING_OBJS} |
|
${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_PING_OBJS} ${LDADD} |
|
|
|
${RTLM_PUB}: ${MQTTPUB_OBJS} |
|
${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTPUB_OBJS} ${LIBS} |
|
|
|
${RTLM_ACC}: ${MQTTACC_OBJS} |
|
${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTACC_OBJS} ${LIBS} |
|
|
|
${RTLM_LOG}: ${MQTTLOG_OBJS} |
|
${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLOG_OBJS} |