Annotation of mqtt/src/Makefile, revision 1.1.1.1.2.5

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.5! misho       6: # $Id: Makefile,v 1.1.1.1.2.4 2011/11/22 14:48:25 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: 
                     22: LDADD = -laitmqtt
                     23: 
                     24: CFLAGS = -I. -I${INC} -I${includedir} -Wall -O2 -fPIC -I/usr/local/include -g -O2
                     25: LDFLAGS = -L. -L${LIB} -L${libdir} -L/usr/local/lib 
                     26: 
1.1.1.1.2.5! misho      27: SRCS = ${MQTTLIB_SRCS} ${MQTTD_SRCS} ${MQTT_SRCS} ${MQTTDB_SRCS}
        !            28: PROGS = ${LIBA} ${LIBSO} ${MQTTD_PROG} ${MQTT_PROG} ${RTLM_DB}
1.1       misho      29: 
                     30: MQTTD_SRCS = mqttd.c compile.c
                     31: MQTTD_OBJS = mqttd.o compile.o
                     32: MQTTD_PROG = mqttd
                     33: 
                     34: MQTT_SRCS = mqtt.c compile.c
                     35: MQTT_OBJS = mqtt.o compile.o
                     36: MQTT_PROG = mqtt
                     37: 
1.1.1.1.2.4  misho      38: MQTTLIB_SRCS = aitmqtt.c conn.c pub.c sub.c recv.c
                     39: MQTTLIB_OBJS = aitmqtt.o conn.o pub.o sub.o recv.o
1.1       misho      40: LIBA = libaitmqtt.a
                     41: LIBSO = libaitmqtt.so
                     42: 
1.1.1.1.2.5! misho      43: MQTTDB_SRCS = dbmqtt.c
        !            44: MQTTDB_OBJS = dbmqtt.o
        !            45: RTLM_DB = mqtt_db.so
        !            46: 
1.1       misho      47: 
                     48: all: depend \
                     49:                ${PROGS} \
                     50: 
                     51: depend:
                     52:        ./compile.sh
                     53:        ${MKDEP} ${CFLAGS} ${SRCS}
                     54: 
                     55: clean:
                     56:        rm -f *.o .depend compile.c *~
                     57: 
                     58: install:
                     59: 
                     60: .o: compile.c
                     61:        ${CC} -c ${CFLAGS} $<
                     62: 
                     63: ${LIBA}: ${MQTTLIB_OBJS}
                     64:        ${AR} -rc ${LIB}/$@ ${MQTTLIB_OBJS}
                     65:        ${RANLIB} ${LIB}/$@
                     66: 
                     67: ${LIBSO}: ${MQTTLIB_OBJS}
                     68:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLIB_OBJS} ${LIBS}
                     69: 
                     70: ${MQTTD_PROG}: ${MQTTD_OBJS}
                     71:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTTD_OBJS} ${LDADD}
                     72: 
                     73: ${MQTT_PROG}: ${MQTT_OBJS}
                     74:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_OBJS} ${LDADD}
1.1.1.1.2.5! misho      75: 
        !            76: ${RTLM_DB}: ${MQTTDB_OBJS}
        !            77:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTDB_OBJS} ${LIBS}

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