Files
dial-reference/server/makefile
Chintan Parikh ac3e488924 Compile DIAL client and server for macOS.
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
2017-12-26 21:16:24 -08:00

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