Annotation of mqtt/src/Makefile, revision 1.1.1.1.2.7

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.7! misho       6: # $Id: Makefile,v 1.1.1.1.2.6 2011/11/22 21:12:52 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.6  misho      28: SRCS = ${MQTTLIB_SRCS} ${MQTTD_SRCS} ${MQTT_SRCS} ${MQTTPUB_SRCS} ${MQTTACC_SRCS}
                     29: PROGS = ${LIBA} ${LIBSO} ${MQTTD_PROG} ${MQTT_PROG} ${RTLM_PUB} ${RTLM_ACC}
1.1       misho      30: 
1.1.1.1.2.7! misho      31: MQTTD_SRCS = mqttd.c compile.c dl.c
        !            32: MQTTD_OBJS = mqttd.o compile.o dl.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.6  misho      44: MQTTPUB_SRCS = dbmqtt.c pubmqtt.c
                     45: MQTTPUB_OBJS = dbmqtt.o pubmqtt.o
                     46: RTLM_PUB = mqtt_pub.so
                     47: 
                     48: MQTTACC_SRCS = dbmqtt.c accmqtt.c
                     49: MQTTACC_OBJS = dbmqtt.o accmqtt.o
                     50: RTLM_ACC = mqtt_acc.so
1.1.1.1.2.5  misho      51: 
1.1       misho      52: 
                     53: all: depend \
                     54:                ${PROGS} \
                     55: 
                     56: depend:
                     57:        ./compile.sh
                     58:        ${MKDEP} ${CFLAGS} ${SRCS}
                     59: 
                     60: clean:
                     61:        rm -f *.o .depend compile.c *~
                     62: 
                     63: install:
                     64: 
                     65: .o: compile.c
                     66:        ${CC} -c ${CFLAGS} $<
                     67: 
                     68: ${LIBA}: ${MQTTLIB_OBJS}
                     69:        ${AR} -rc ${LIB}/$@ ${MQTTLIB_OBJS}
                     70:        ${RANLIB} ${LIB}/$@
                     71: 
                     72: ${LIBSO}: ${MQTTLIB_OBJS}
1.1.1.1.2.7! misho      73:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLIB_OBJS}
1.1       misho      74: 
                     75: ${MQTTD_PROG}: ${MQTTD_OBJS}
                     76:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTTD_OBJS} ${LDADD}
                     77: 
                     78: ${MQTT_PROG}: ${MQTT_OBJS}
                     79:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_OBJS} ${LDADD}
1.1.1.1.2.5  misho      80: 
1.1.1.1.2.6  misho      81: ${RTLM_PUB}: ${MQTTPUB_OBJS}
1.1.1.1.2.7! misho      82:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTPUB_OBJS} ${LIBS}
1.1.1.1.2.6  misho      83: 
                     84: ${RTLM_ACC}: ${MQTTACC_OBJS}
1.1.1.1.2.7! misho      85:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTACC_OBJS} ${LIBS}

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