Statistics
| Branch: | Tag: | Revision:

mongoose / examples / api_server / Makefile @ eaef5bd1

History | View | Annotate | Download (517 Bytes)

1
PROG = api_server
2
SOURCES = $(PROG).c sqlite3.c db_plugin_sqlite.c ../../mongoose.c
3
CFLAGS = -W -Wall $(CFLAGS_EXTRA)
4

    
5

    
6
ifeq ($(OS), Windows_NT)
7
  CFLAGS += -lws2_32
8
  CC = gcc
9
else
10
  UNAME_S := $(shell uname -s)
11
  ifeq ($(UNAME_S), Linux)
12
    CFLAGS += -ldl -lm -pthread
13
  endif
14
endif
15

    
16
all: $(PROG)
17

    
18
$(PROG): $(SOURCES)
19
	$(CC) $(SOURCES) -o $@ $(CFLAGS)
20

    
21
$(PROG).exe: $(SOURCES)
22
	cl $(SOURCES) /I.. /MD /Fe$@
23

    
24
test: $(PROG)
25
	sh unit_test.sh $$(pwd)/$(PROG)
26

    
27
clean:
28
	rm -rf *.gc* *.dSYM *.exe *.obj *.o a.out $(PROG)