2012-10-18 06:40:45 +00:00
|
|
|
NACL_BASE= nacl/src
|
|
|
|
include $(NACL_BASE)/nacl.mk
|
2012-10-24 18:00:14 +00:00
|
|
|
SERVAL_BASE=
|
|
|
|
include sourcefiles.mk
|
|
|
|
include headerfiles.mk
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-09-06 03:13:06 +00:00
|
|
|
HAVE_ALSA= @HAVE_ALSA@
|
|
|
|
ifeq (HAVE_ALSA,1)
|
2012-11-22 07:48:00 +00:00
|
|
|
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
|
2012-09-05 09:23:22 +00:00
|
|
|
endif
|
|
|
|
|
2012-11-22 07:48:00 +00:00
|
|
|
SRCS= $(NACL_SOURCES) $(SERVAL_SOURCES)
|
|
|
|
|
2012-07-29 03:34:03 +00:00
|
|
|
MONITORCLIENTSRCS=conf.c \
|
2012-12-04 03:42:28 +00:00
|
|
|
conf_om.c \
|
|
|
|
conf_parse.c \
|
|
|
|
conf_schema.c \
|
2012-07-29 03:34:03 +00:00
|
|
|
log.c \
|
2012-12-03 23:42:35 +00:00
|
|
|
os.c \
|
2012-12-03 23:26:24 +00:00
|
|
|
mem.c \
|
2012-07-29 03:34:03 +00:00
|
|
|
monitor-client.c \
|
|
|
|
net.c \
|
2012-08-06 02:55:45 +00:00
|
|
|
str.c \
|
2012-07-29 03:34:03 +00:00
|
|
|
strbuf.c \
|
|
|
|
strbuf_helpers.c
|
|
|
|
|
2012-09-14 02:17:48 +00:00
|
|
|
MDPCLIENTSRCS=conf.c \
|
2012-12-04 03:42:28 +00:00
|
|
|
conf_om.c \
|
|
|
|
conf_parse.c \
|
|
|
|
conf_schema.c \
|
2012-09-18 02:56:30 +00:00
|
|
|
dataformats.c \
|
2012-12-03 23:42:35 +00:00
|
|
|
os.c \
|
2012-12-03 23:26:24 +00:00
|
|
|
mem.c \
|
2012-09-14 02:17:48 +00:00
|
|
|
log.c \
|
|
|
|
mdp_client.c \
|
|
|
|
net.c \
|
|
|
|
str.c \
|
|
|
|
strbuf.c \
|
|
|
|
strbuf_helpers.c
|
|
|
|
|
2012-04-19 06:18:00 +00:00
|
|
|
OBJS= $(SRCS:.c=.o)
|
2012-11-22 07:48:00 +00:00
|
|
|
SERVAL_OBJS= $(SERVAL_SOURCES:.c=.o)
|
2012-07-29 03:34:03 +00:00
|
|
|
MONITORCLIENTOBJS= $(MONITORCLIENTSRCS:.c=.o)
|
2012-09-14 02:17:48 +00:00
|
|
|
MDPCLIENTOBJS= $(MDPCLIENTSRCS:.c=.o)
|
2012-07-29 03:34:03 +00:00
|
|
|
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-09-05 09:23:22 +00:00
|
|
|
LDFLAGS=@LDFLAGS@ @LIBS@ @PORTAUDIO_LIBS@ @SRC_LIBS@ @SPANDSP_LIBS@ @CODEC2_LIBS@ @PTHREAD_LIBS@
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-10-18 06:40:45 +00:00
|
|
|
CFLAGS= -Isqlite-amalgamation-3070900 @CPPFLAGS@ @CFLAGS@ @PORTAUDIO_CFLAGS@ @SRC_CFLAGS@ @SPANDSP_CFLAGS@ @PTHREAD_CFLAGS@ $(VOIPTEST_CFLAGS) -Inacl/include
|
2012-08-06 07:33:00 +00:00
|
|
|
CFLAGS+=-fPIC
|
2012-06-15 05:31:14 +00:00
|
|
|
CFLAGS+=-Wall -Wno-unused-value
|
2012-09-05 09:23:22 +00:00
|
|
|
# Solaris magic
|
|
|
|
CFLAGS+=-DSHA2_USE_INTTYPES_H -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1
|
2012-09-06 05:02:17 +00:00
|
|
|
# OSX magic to compensate for the Solaris magic
|
|
|
|
CFLAGS+=-D_DARWIN_C_SOURCE
|
2012-07-29 05:25:10 +00:00
|
|
|
-include Makefile.dbg
|
2012-06-15 05:31:14 +00:00
|
|
|
|
|
|
|
DEFS= @DEFS@
|
2012-04-23 10:47:11 +00:00
|
|
|
|
2012-10-31 07:43:33 +00:00
|
|
|
all: servald libmonitorclient.so libmonitorclient.a tfw_createfile
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-08-27 07:33:50 +00:00
|
|
|
sqlite-amalgamation-3070900/sqlite3.o: sqlite-amalgamation-3070900/sqlite3.c
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo CC $<
|
2012-08-27 07:33:50 +00:00
|
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $< -o sqlite-amalgamation-3070900/sqlite3.o
|
2012-04-20 07:40:38 +00:00
|
|
|
|
2012-11-22 07:48:00 +00:00
|
|
|
%.o: %.c
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo CC $<
|
2012-10-18 06:40:45 +00:00
|
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-11-22 07:48:00 +00:00
|
|
|
$(SERVAL_OBJS): $(HDRS)
|
|
|
|
$(MONITORCLIENTOBJS): $(HDRS)
|
|
|
|
$(MDPCLIENTOBJS): $(HDRS)
|
|
|
|
|
2012-07-29 03:05:53 +00:00
|
|
|
servald: $(OBJS)
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo LINK $@
|
|
|
|
@$(CC) $(CFLAGS) -Wall -o $@ $(OBJS) $(LDFLAGS)
|
2012-04-20 07:27:36 +00:00
|
|
|
|
2012-09-14 02:20:45 +00:00
|
|
|
directory_service: $(MDPCLIENTOBJS) directory_service.o
|
|
|
|
@echo LINK $@
|
|
|
|
@$(CC) $(CFLAGS) -Wall -o $@ $(MDPCLIENTOBJS) directory_service.o $(LDFLAGS)
|
|
|
|
|
2012-11-20 03:13:51 +00:00
|
|
|
tfw_createfile: tfw_createfile.o str.o strbuf.o strbuf_helpers.o
|
2012-10-31 07:43:33 +00:00
|
|
|
@echo LINK $@
|
2012-11-20 03:13:51 +00:00
|
|
|
@$(CC) $(CFLAGS) -Wall -o $@ tfw_createfile.o str.o strbuf.o strbuf_helpers.o
|
2012-10-31 07:43:33 +00:00
|
|
|
|
2012-06-15 05:31:14 +00:00
|
|
|
# This does not build on 64 bit elf platforms as NaCL isn't built with -fPIC
|
|
|
|
# DOC 20120615
|
2012-04-20 07:27:36 +00:00
|
|
|
libservald.so: $(OBJS)
|
2012-05-10 03:53:06 +00:00
|
|
|
@echo LINK $@
|
|
|
|
@$(CC) $(CFLAGS) -Wall -shared -o $@ $(OBJS) $(LDFLAGS)
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-07-29 03:34:03 +00:00
|
|
|
libmonitorclient.so: $(MONITORCLIENTOBJS)
|
2012-07-29 03:05:53 +00:00
|
|
|
@echo LINK $@
|
2012-07-29 03:34:03 +00:00
|
|
|
@$(CC) $(CFLAGS) -Wall -shared -o $@ $(MONITORCLIENTOBJS) $(LDFLAGS)
|
2012-03-14 22:54:31 +00:00
|
|
|
|
2012-08-10 05:06:46 +00:00
|
|
|
libmonitorclient.a: $(MONITORCLIENTOBJS)
|
|
|
|
@echo AR $@
|
|
|
|
@$(AR) -cr $@ $(MONITORCLIENTOBJS)
|
|
|
|
|
2012-05-21 04:23:34 +00:00
|
|
|
clean:
|
2012-08-10 05:06:46 +00:00
|
|
|
@rm -f $(OBJS) servald libservald.so libmonitorclient.so libmonitorclient.a
|