mongoose/examples/api_server/Makefile
Alexander Alashkin e95c074965 Replace strnlen with c_strnlen
PUBLISHED_FROM=815cfaea77171761c952966e98466b87b719de06
2016-03-21 13:29:35 +01:00

29 lines
517 B
Makefile

PROG = api_server
SOURCES = $(PROG).c sqlite3.c db_plugin_sqlite.c ../../mongoose.c
CFLAGS = -W -Wall $(CFLAGS_EXTRA)
ifeq ($(OS), Windows_NT)
CFLAGS += -lws2_32
CC = gcc
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Linux)
CFLAGS += -ldl -lm -pthread
endif
endif
all: $(PROG)
$(PROG): $(SOURCES)
$(CC) $(SOURCES) -o $@ $(CFLAGS)
$(PROG).exe: $(SOURCES)
cl $(SOURCES) /I.. /MD /Fe$@
test: $(PROG)
sh unit_test.sh $$(pwd)/$(PROG)
clean:
rm -rf *.gc* *.dSYM *.exe *.obj *.o a.out $(PROG)