Annotation of mqtt/src/Makefile, revision 1.1.1.1.2.19

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.19! misho       6: # $Id: Makefile,v 1.1.1.1.2.18 2011/12/20 16:04:34 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.13  misho      22: LIBS = -laitio -laitcfg -lsqlite3
1.1.1.1.2.14  misho      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.1.1.1.2.16  misho      26: LDFLAGS = -L. -L${LIB} -L${libdir} -L/usr/local/lib
1.1       misho      27: 
1.1.1.1.2.18  misho      28: SRCS = ${MQTTLIB_SRCS} ${MQTTD_SRCS} ${MQTT_SUBS_SRCS} ${MQTT_PUB_SRCS} \
1.1.1.1.2.17  misho      29:        ${MQTTPUB_SRCS} ${MQTTACC_SRCS} ${MQTTLOG_SRCS}
1.1.1.1.2.18  misho      30: PROGS = ${LIBA} ${LIBSO} ${MQTTD_PROG} ${MQTT_SUBS_PROG} ${MQTT_PUB_PROG} \
1.1.1.1.2.17  misho      31:        ${RTLM_PUB} ${RTLM_ACC} ${RTLM_LOG}
1.1       misho      32: 
1.1.1.1.2.19! 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.1.1.1.2.18  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
1.1       misho      40: 
1.1.1.1.2.17  misho      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
                     44: 
1.1.1.1.2.4  misho      45: MQTTLIB_SRCS = aitmqtt.c conn.c pub.c sub.c recv.c
                     46: MQTTLIB_OBJS = aitmqtt.o conn.o pub.o sub.o recv.o
1.1       misho      47: LIBA = libaitmqtt.a
                     48: LIBSO = libaitmqtt.so
                     49: 
1.1.1.1.2.9  misho      50: MQTTPUB_SRCS = pubmqtt.c pub_schema.c
                     51: MQTTPUB_OBJS = pubmqtt.o pub_schema.o
1.1.1.1.2.6  misho      52: RTLM_PUB = mqtt_pub.so
                     53: 
1.1.1.1.2.9  misho      54: MQTTACC_SRCS = accmqtt.c acc_schema.c
                     55: MQTTACC_OBJS = accmqtt.o acc_schema.o
1.1.1.1.2.6  misho      56: RTLM_ACC = mqtt_acc.so
1.1.1.1.2.5  misho      57: 
1.1.1.1.2.8  misho      58: MQTTLOG_SRCS = logmqtt.c
                     59: MQTTLOG_OBJS = logmqtt.o
                     60: RTLM_LOG = mqtt_log.so
                     61: 
1.1       misho      62: 
                     63: all: depend \
                     64:                ${PROGS} \
                     65: 
                     66: depend:
                     67:        ./compile.sh
                     68:        ${MKDEP} ${CFLAGS} ${SRCS}
                     69: 
                     70: clean:
1.1.1.1.2.9  misho      71:        rm -f *.o .depend compile.c acc_schema.c pub_schema.c *~
1.1       misho      72: 
                     73: install:
                     74: 
1.1.1.1.2.9  misho      75: .o: compile.c acc_schema.c pub_schema.c
1.1       misho      76:        ${CC} -c ${CFLAGS} $<
                     77: 
                     78: ${LIBA}: ${MQTTLIB_OBJS}
                     79:        ${AR} -rc ${LIB}/$@ ${MQTTLIB_OBJS}
                     80:        ${RANLIB} ${LIB}/$@
                     81: 
                     82: ${LIBSO}: ${MQTTLIB_OBJS}
1.1.1.1.2.7  misho      83:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLIB_OBJS}
1.1       misho      84: 
                     85: ${MQTTD_PROG}: ${MQTTD_OBJS}
                     86:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTTD_OBJS} ${LDADD}
                     87: 
1.1.1.1.2.18  misho      88: ${MQTT_SUBS_PROG}: ${MQTT_SUBS_OBJS}
                     89:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_SUBS_OBJS} ${LDADD}
1.1.1.1.2.5  misho      90: 
1.1.1.1.2.17  misho      91: ${MQTT_PUB_PROG}: ${MQTT_PUB_OBJS}
                     92:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_PUB_OBJS} ${LDADD}
                     93: 
1.1.1.1.2.6  misho      94: ${RTLM_PUB}: ${MQTTPUB_OBJS}
1.1.1.1.2.7  misho      95:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTPUB_OBJS} ${LIBS}
1.1.1.1.2.6  misho      96: 
                     97: ${RTLM_ACC}: ${MQTTACC_OBJS}
1.1.1.1.2.7  misho      98:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTACC_OBJS} ${LIBS}
1.1.1.1.2.8  misho      99: 
                    100: ${RTLM_LOG}: ${MQTTLOG_OBJS}
                    101:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLOG_OBJS}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>