-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.5 KB
/
Copy pathMakefile
File metadata and controls
51 lines (42 loc) · 1.5 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Makefile for TLS-enabled chat client, server, and directory server
#
CC = gcc
EXECUTABLES=chatClient5 chatServer5 directoryServer5
INCLUDES = $(wildcard *.h)
SOURCES = $(wildcard *.c)
DEPS = $(INCLUDES)
OBJECTS = $(SOURCES:.c=.o)
OBJECTS += $(SOURCES:.c=.dSYM*)
EXTRAS = $(SOURCES:.c=.exe*)
LIBS =
LDFLAGS =
CFLAGS = -g -ggdb -std=c99 \
-Wuninitialized -Wunused -Wunused-macros -Wunused-variable \
-Wunused-function -Wunused-but-set-parameter \
-Wignored-qualifiers -Wshift-negative-value \
-Wmain -Wreturn-type \
-Winit-self -Wimplicit-int -Wimplicit-fallthrough \
-Wparentheses -Wdangling-else -Wfatal-errors \
-Wreturn-type -Wredundant-decls -Wswitch-default -Wshadow \
-Wformat=2 -Wformat-nonliteral -Wformat-y2k -Wformat-security
CFLAGS += -ggdb3
#CFLAGS += -Wconversion
#CFLAGS += -Wc99-c11-compat -Wmaybe-uninitialized \
-Wformat-truncation=2 -Wstringop-truncation \
-Wformat-overflow=2 -Wformat-signedness
# Uncomment the LIBS line below containing the library that you're using
#LIBS = -lcrypto -lgnutls
#LIBS = -lcrypto -lssl
all: tls
tls: $(EXECUTABLES)
chatClient5: chatClient5.c $(DEPS)
$(CC) $(LDFLAGS) $(CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $< $(LIBS)
chatServer5: chatServer5.c $(DEPS)
$(CC) $(LDFLAGS) $(CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $< $(LIBS)
directoryServer5: directoryServer5.c $(DEPS)
$(CC) $(LDFLAGS) $(CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $< $(LIBS)
# Clean up the mess we made
.PHONY: clean
clean:
@-rm -rf $(OBJECTS) $(EXECUTABLES) $(EXTRAS)