-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
28 lines (21 loc) · 820 Bytes
/
Makefile
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
CC=gcc
ifdef RELEASE
COPTS=-std=c99 -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual \
-Wstrict-prototypes -Wmissing-prototypes
COPTS+=-O2
else
COPTS=-std=c99 -pedantic -Wall \
-Wextra -Wformat=2 -Wswitch-default -Wswitch-enum -Wcast-align -Wpointer-arith \
-Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline \
-Wundef -Wnested-externs -Wcast-qual -Wshadow \
-Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \
-Wold-style-definition -Werror
COPTS+=-g -O0 -fno-omit-frame-pointer -fno-common -fstrict-aliasing
endif
CFLAGS=-I dist/cjson $(COPTS)
LDFLAGS= -lssh -lcurl -lssh_threads
SOURCES:=$(wildcard src/*.c) $(wildcard dist/cjson/cJSON.c)
stunneler: $(SOURCES)
$(CC) $(CFLAGS) -o $@ $(SOURCES) $(LDFLAGS)
clean:
rm -rf src/*.o dist/cjson/*.o stunneler