serval-dna/Makefile.in

120 lines
3.4 KiB
Makefile
Raw Normal View History

NACL_BASE= nacl/src
include $(NACL_BASE)/nacl.mk
SERVAL_BASE=
include sourcefiles.mk
include headerfiles.mk
2012-09-06 03:13:06 +00:00
HAVE_ALSA= @HAVE_ALSA@
ifeq (HAVE_ALSA,1)
SERVAL_SOURCES+= $(SERVAL_BASE)/audio_alsa.c
endif
HAVE_VOIPTEST= @HAVE_VOIPTEST@
ifeq ($(HAVE_VOIPTEST), 1)
SERVAL_SOURCES+= $(SERVAL_BASE)/pa_phone.c
VOIPTEST_CFLAGS=-DHAVE_VOIPTEST=1
endif
SRCS= $(NACL_SOURCES) $(SERVAL_SOURCES)
2012-07-29 03:34:03 +00:00
MONITORCLIENTSRCS=conf.c \
conf_om.c \
conf_parse.c \
conf_schema.c \
2012-12-09 23:09:15 +00:00
dataformats.c \
2012-07-29 03:34:03 +00:00
log.c \
xprintf.c \
os.c \
mem.c \
2012-07-29 03:34:03 +00:00
monitor-client.c \
instance.c \
2012-07-29 03:34:03 +00:00
net.c \
str.c \
2012-07-29 03:34:03 +00:00
strbuf.c \
2013-04-29 05:00:44 +00:00
strbuf_helpers.c \
rotbuf.c
2012-07-29 03:34:03 +00:00
MDPCLIENTSRCS=conf.c \
conf_om.c \
conf_parse.c \
conf_schema.c \
dataformats.c \
os.c \
mem.c \
log.c \
xprintf.c \
mdp_client.c \
instance.c \
net.c \
str.c \
strbuf.c \
2013-04-29 05:00:44 +00:00
strbuf_helpers.c \
rotbuf.c
2012-04-19 06:18:00 +00:00
OBJS= $(SRCS:.c=.o)
SERVAL_OBJS= $(SERVAL_SOURCES:.c=.o)
2012-07-29 03:34:03 +00:00
MONITORCLIENTOBJS= $(MONITORCLIENTSRCS:.c=.o)
MDPCLIENTOBJS= $(MDPCLIENTSRCS:.c=.o)
2012-07-29 03:34:03 +00:00
LDFLAGS=@LDFLAGS@ @LIBS@ @PORTAUDIO_LIBS@ @SRC_LIBS@ @SPANDSP_LIBS@ @CODEC2_LIBS@ @PTHREAD_LIBS@
CFLAGS= -Isqlite-amalgamation-3070900 @CPPFLAGS@ @CFLAGS@ @PORTAUDIO_CFLAGS@ @SRC_CFLAGS@ @SPANDSP_CFLAGS@ @PTHREAD_CFLAGS@ $(VOIPTEST_CFLAGS) -Inacl/include
CFLAGS+=-fPIC
CFLAGS+=-Wall -Wno-unused-value
# Solaris magic
CFLAGS+=-DSHA2_USE_INTTYPES_H -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1
# OSX magic to compensate for the Solaris magic
CFLAGS+=-D_DARWIN_C_SOURCE
-include Makefile.dbg
DEFS= @DEFS@
all: servald libmonitorclient.so libmonitorclient.a tfw_createfile
sqlite-amalgamation-3070900/sqlite3.o: sqlite-amalgamation-3070900/sqlite3.c
2012-05-10 03:53:06 +00:00
@echo CC $<
@$(CC) $(CFLAGS) $(DEFS) -c $< -o sqlite-amalgamation-3070900/sqlite3.o
%.o: %.c
2012-05-10 03:53:06 +00:00
@echo CC $<
@$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
$(SERVAL_OBJS): $(HDRS)
$(MONITORCLIENTOBJS): $(HDRS)
$(MDPCLIENTOBJS): $(HDRS)
servald: $(OBJS)
2012-05-10 03:53:06 +00:00
@echo LINK $@
@v=`./version_string.sh` \
&& $(CC) $(CFLAGS) -Wall -o $@ -DSERVALD_VERSION="\"$$v\"" version_servald.c $(OBJS) $(LDFLAGS)
2012-09-14 02:20:45 +00:00
directory_service: $(MDPCLIENTOBJS) directory_service.o
@echo LINK $@
@v=`./version_string.sh` \
&& $(CC) $(CFLAGS) -Wall -o $@ -DSERVALD_VERSION="\"$$v\"" version_servald.c $(MDPCLIENTOBJS) directory_service.o $(LDFLAGS)
2012-09-14 02:20:45 +00:00
tfw_createfile: tfw_createfile.o str.o strbuf.o strbuf_helpers.o
@echo LINK $@
@$(CC) $(CFLAGS) -Wall -o $@ tfw_createfile.o str.o strbuf.o strbuf_helpers.o
# This does not build on 64 bit elf platforms as NaCL isn't built with -fPIC
# DOC 20120615
libservald.so: $(OBJS)
2012-05-10 03:53:06 +00:00
@echo LINK $@
@v=`./version_string.sh` && $(CC) $(CFLAGS) $(DEFS) -DSERVALD_VERSION="\"$$v\"" -Wall -o version_servald.o -c version_servald.c
@$(CC) $(CFLAGS) -Wall -shared -o $@ $(OBJS) version_servald.o $(LDFLAGS)
2012-07-29 03:34:03 +00:00
libmonitorclient.so: $(MONITORCLIENTOBJS)
@echo LINK $@
@v=`./version_string.sh` && $(CC) $(CFLAGS) $(DEFS) -DSERVALD_VERSION="\"$$v\"" -Wall -o version_libmonitorclient.o -c version_servald.c
@$(CC) $(CFLAGS) -Wall -shared -o $@ $(MONITORCLIENTOBJS) version_libmonitorclient.o $(LDFLAGS)
libmonitorclient.a: $(MONITORCLIENTOBJS)
@echo AR $@
@v=`./version_string.sh` && $(CC) $(CFLAGS) $(DEFS) -DSERVALD_VERSION="\"$$v\"" -Wall -o version_libmonitorclient.o -c version_servald.c
@$(AR) -cr $@ $(MONITORCLIENTOBJS) version_libmonitorclient.o
2012-05-21 04:23:34 +00:00
clean:
@rm -f $(OBJS) tfw_createfile.o tfw_createfile servald libservald.so libmonitorclient.so version_libmonitorclient.o libmonitorclient.a