Annotation of mqtt/src/Makefile, revision 1.1.1.1.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.1.1.1.2.1! misho       6: # $Id: Makefile,v 1.1.1.1 2011/11/07 08:47:16 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: 
                     27: SRCS = ${MQTTLIB_SRCS} ${MQTTD_SRCS} ${MQTT_SRCS}
                     28: PROGS = ${LIBA} ${LIBSO} ${MQTTD_PROG} ${MQTT_PROG}
                     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.1! misho      38: MQTTLIB_SRCS = aitmqtt.c conn.c
        !            39: MQTTLIB_OBJS = aitmqtt.o conn.o
1.1       misho      40: LIBA = libaitmqtt.a
                     41: LIBSO = libaitmqtt.so
                     42: 
                     43: 
                     44: all: depend \
                     45:                ${PROGS} \
                     46: 
                     47: depend:
                     48:        ./compile.sh
                     49:        ${MKDEP} ${CFLAGS} ${SRCS}
                     50: 
                     51: clean:
                     52:        rm -f *.o .depend compile.c *~
                     53: 
                     54: install:
                     55: 
                     56: .o: compile.c
                     57:        ${CC} -c ${CFLAGS} $<
                     58: 
                     59: ${LIBA}: ${MQTTLIB_OBJS}
                     60:        ${AR} -rc ${LIB}/$@ ${MQTTLIB_OBJS}
                     61:        ${RANLIB} ${LIB}/$@
                     62: 
                     63: ${LIBSO}: ${MQTTLIB_OBJS}
                     64:        ${CC} ${LDFLAGS} -shared -nostartfiles -o ${LIB}/$@ -Wl,-x,-soname,$@ ${MQTTLIB_OBJS} ${LIBS}
                     65: 
                     66: ${MQTTD_PROG}: ${MQTTD_OBJS}
                     67:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTTD_OBJS} ${LDADD}
                     68: 
                     69: ${MQTT_PROG}: ${MQTT_OBJS}
                     70:        ${CC} ${LDFLAGS} -o${BIN}/$@ ${MQTT_OBJS} ${LDADD}

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