Files
dial-reference/server/makefile
Chintan Parikh dcb66b3641 Fix build errors on Ubuntu Xenial 64 bit.
Add -fPIC flag for building the lib, also add -Wl,--allow-shlib-undefined
in the client LDFLAGS.
2017-10-02 10:47:15 -07:00

30 lines
686 B
Makefile

CC=$(TARGET)gcc
.PHONY: clean
.DEFAULT_GOAL=all
OBJS := main.o dial_server.o mongoose.o quick_ssdp.o url_lib.o dial_data.o LinuxInterfaces.o
HEADERS := $(wildcard *.h)
%.c: $(HEADERS)
%.o: %.c $(HEADERS)
# $(CC) -Wall -Werror -g -std=gnu99 $(CFLAGS) -c $*.c -o $*.o
$(CC) -Wall -g -fPIC -std=gnu99 $(CFLAGS) -c $*.c -o $*.o
all: dialserver test
nf_callbacks_lib: nf_callbacks.o
$(CC) -Wall -Werror -g nf_callbacks.o -o libnfCallbacks.so --shared
dialserver: nf_callbacks_lib $(OBJS)
$(CC) -Wall -Werror -Wl,-rpath,. -g $(OBJS) -ldl -lpthread -lrt -L. -lnfCallbacks -o dialserver
test:
make -C tests
./tests/run_tests
clean:
rm -f *.o dialserver *.so
make -C tests clean