NACL_BASE= nacl/src include $(NACL_BASE)/nacl.mk SERVAL_BASE= include sourcefiles.mk SRCS= $(NACL_SOURCES) $(SERVAL_SOURCES) include headerfiles.mk HAVE_ALSA= @HAVE_ALSA@ ifeq (HAVE_ALSA,1) SRCS+= audio_alsa.c endif MONITORCLIENTSRCS=conf.c \ log.c \ mkdir.c \ monitor-client.c \ net.c \ str.c \ strbuf.c \ strbuf_helpers.c MDPCLIENTSRCS=conf.c \ dataformats.c \ mkdir.c \ log.c \ mdp_client.c \ net.c \ str.c \ strbuf.c \ strbuf_helpers.c HAVE_VOIPTEST= @HAVE_VOIPTEST@ ifeq ($(HAVE_VOIPTEST), 1) SRCS+= pa_phone.c VOIPTEST_CFLAGS=-DHAVE_VOIPTEST=1 endif OBJS= $(SRCS:.c=.o) MONITORCLIENTOBJS= $(MONITORCLIENTSRCS:.c=.o) MDPCLIENTOBJS= $(MDPCLIENTSRCS:.c=.o) 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 @echo CC $< @$(CC) $(CFLAGS) $(DEFS) -c $< -o sqlite-amalgamation-3070900/sqlite3.o %.o: %.c $(HDRS) @echo CC $< @$(CC) $(CFLAGS) $(DEFS) -c $< -o $@ servald: $(OBJS) @echo LINK $@ @$(CC) $(CFLAGS) -Wall -o $@ $(OBJS) $(LDFLAGS) directory_service: $(MDPCLIENTOBJS) directory_service.o @echo LINK $@ @$(CC) $(CFLAGS) -Wall -o $@ $(MDPCLIENTOBJS) directory_service.o $(LDFLAGS) 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) @echo LINK $@ @$(CC) $(CFLAGS) -Wall -shared -o $@ $(OBJS) $(LDFLAGS) libmonitorclient.so: $(MONITORCLIENTOBJS) @echo LINK $@ @$(CC) $(CFLAGS) -Wall -shared -o $@ $(MONITORCLIENTOBJS) $(LDFLAGS) libmonitorclient.a: $(MONITORCLIENTOBJS) @echo AR $@ @$(AR) -cr $@ $(MONITORCLIENTOBJS) clean: @rm -f $(OBJS) servald libservald.so libmonitorclient.so libmonitorclient.a