mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
27a0a6eeb5
Replaces (const char *file, unsigned int line, const char *function) arguments to all logging functions, simplifies malloc/free tracking code in overlay_buffer.c and Rhizome manifest alloc/free tracking in rhizome_bundle.c. Use __HERE__ macro instead of (__FILE__, __LINE__, __FUNCTION__) everywhere. Special __NOWHERE__ macro is equivalent to (NULL, 0, NULL). Declare net.c functions in new "net.h" header, so log.c doesn't have to pull in the entire "serval.h" just to use write_str(). Facilitates progress on issue #2.
136 lines
2.5 KiB
Makefile
136 lines
2.5 KiB
Makefile
SRCS= \
|
|
audiodevices.c \
|
|
audio_alsa.c \
|
|
audio_msm_g1.c \
|
|
audio_reflector.c \
|
|
batman.c \
|
|
ciphers.c \
|
|
client.c \
|
|
codecs.c \
|
|
commandline.c \
|
|
conf.c \
|
|
dataformats.c \
|
|
dna_helper.c \
|
|
dna_identity.c \
|
|
encode.c \
|
|
fdqueue.c \
|
|
fifo.c \
|
|
gateway.c \
|
|
keyring.c \
|
|
log.c \
|
|
lsif.c \
|
|
main.c \
|
|
mkdir.c \
|
|
monitor.c \
|
|
monitor-cli.c \
|
|
net.c \
|
|
overlay.c \
|
|
overlay_abbreviations.c \
|
|
overlay_advertise.c \
|
|
overlay_broadcast.c \
|
|
overlay_buffer.c \
|
|
overlay_interface.c \
|
|
overlay_mdp.c \
|
|
overlay_packetformats.c \
|
|
overlay_payload.c \
|
|
overlay_route.c \
|
|
packetformats.c \
|
|
performance_timing.c \
|
|
peers.c \
|
|
randombytes.c \
|
|
responses.c \
|
|
rhizome.c \
|
|
rhizome_bundle.c \
|
|
rhizome_crypto.c \
|
|
rhizome_database.c \
|
|
rhizome_fetch.c \
|
|
rhizome_http.c \
|
|
rhizome_packetformats.c \
|
|
serval_packetvisualise.c \
|
|
server.c \
|
|
sha2.c \
|
|
sighandlers.c \
|
|
simulate.c \
|
|
sqlite3.c \
|
|
srandomdev.c \
|
|
str.c \
|
|
strbuf.c \
|
|
strbuf_helpers.c \
|
|
strlcpy.c \
|
|
vomp.c \
|
|
xprintf.c
|
|
|
|
MONITORCLIENTSRCS=conf.c \
|
|
log.c \
|
|
mkdir.c \
|
|
monitor-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)
|
|
|
|
HDRS= fifo.h \
|
|
Makefile \
|
|
rhizome.h \
|
|
serval.h \
|
|
strbuf.h \
|
|
strbuf_helpers.h \
|
|
sha2.h \
|
|
conf.h \
|
|
log.h \
|
|
net.h \
|
|
xprintf.h \
|
|
constants.h \
|
|
monitor-client.h \
|
|
sqlite-amalgamation-3070900/sqlite3.h
|
|
|
|
LDFLAGS=@LDFLAGS@ @PORTAUDIO_LIBS@ @SRC_LIBS@ @SPANDSP_LIBS@ @CODEC2_LIBS@ @PTHREAD_LIBS@
|
|
|
|
CFLAGS= @CPPFLAGS@ @CFLAGS@ @PORTAUDIO_CFLAGS@ @SRC_CFLAGS@ @SPANDSP_CFLAGS@ @PTHREAD_CFLAGS@ $(VOIPTEST_CFLAGS)
|
|
CFLAGS+=-fPIC
|
|
CFLAGS+=-Wall -Wno-unused-value
|
|
-include Makefile.dbg
|
|
|
|
DEFS= @DEFS@
|
|
|
|
all: servald libmonitorclient.so libmonitorclient.a
|
|
|
|
sqlite3.o: sqlite3.c
|
|
@echo CC $<
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $<
|
|
|
|
%.o: %.c $(HDRS)
|
|
@echo CC $<
|
|
@$(CC) $(CFLAGS) $(DEFS) -c $<
|
|
|
|
servald: $(OBJS)
|
|
@echo LINK $@
|
|
@$(CC) $(CFLAGS) -Wall -o $@ $(OBJS) $(LDFLAGS)
|
|
|
|
# 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
|