summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/mongoose/examples/web_server/Makefile
blob: 4f9eacb6d0692e4da824ce090541d6fe26ba2f90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright (c) 2014 Cesanta Software
# All rights reserved

PROG = web_server
CFLAGS = -W -Wall -I../.. -g -O0  $(CFLAGS_EXTRA)
SOURCES = $(PROG).c ../../mongoose.c
OPENSSL_FLAGS = -DNS_ENABLE_SSL -lssl

# PolarSSL paths and flags
POLARSSL_PATH = /usr/local
POLARSSLCOMPAT_PATH = ./../../../polar
SOURCES_POLAR = $(SOURCES) $(POLARSSLCOMPAT_PATH)/polarssl_compat.c
INCDIR_POLAR = -I$(POLARSSLCOMPAT_PATH) -I$(POLARSSL_PATH)/include
LDFLAGS_POLAR = -L$(POLARSSL_PATH)/lib -lmbedtls
CFLAGS_POLAR = $(CFLAGS) $(INCDIR_POLAR) -DNS_ENABLE_SSL

$(PROG): $(SOURCES)
	$(CC) -o $(PROG) $(SOURCES) $(CFLAGS)

$(PROG).exe: $(SOURCES)
	cl -Fo $(PROG) $(SOURCES) -nologo -MD -I../..

openssl:
	$(CC) -o $(PROG) $(SOURCES) $(CFLAGS) $(OPENSSL_FLAGS)

polarssl:
	$(CC) -o $(PROG) $(SOURCES_POLAR) $(LDFLAGS_POLAR) $(CFLAGS_POLAR)

clean:
	rm -rf $(PROG) *.exe *.dSYM *.obj *.exp .*o *.lib