mirror of
https://github.com/Netflix/dial-reference.git
synced 2026-06-08 19:09:59 +00:00
Changes: * Added method to get mac and ip address for OSX. Current Linux method of query via SIOCGIFCONF doesn't work. Added code to read via getifaddrs() API. * Put non OSX specific code under #ifdef flags. * Removed few linker libraries which are not required (lcares and lrt). * Fixed many warnings. Tested on: OSX 10.12
32 lines
768 B
Makefile
32 lines
768 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
|
|
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
|
|
$(CC) -Wall -Werror -Wl,-undefined -Wl,dynamic_lookup -g nf_callbacks.o -o libnfCallbacks.so --shared
|
|
|
|
|
|
dialserver: nf_callbacks_lib $(OBJS)
|
|
$(CC) -Wall -Werror -Wl,-rpath,. -g $(OBJS) -ldl -lpthread -L. -lnfCallbacks -o dialserver
|
|
|
|
test:
|
|
make -C tests
|
|
./tests/run_tests
|
|
|
|
clean:
|
|
rm -f *.o dialserver *.so
|
|
make -C tests clean
|