mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-04 18:29:01 +08:00
c581b5e532
PUBLISHED_FROM=2781248e982719cda495370a373f66d6e4213d83
29 lines
539 B
Makefile
29 lines
539 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 -D_MG_PROVIDE_STRNLEN
|
|
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)
|