-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 1.01 KB
/
Makefile
File metadata and controls
38 lines (27 loc) · 1.01 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
CC = gcc
CFLAGS = -Wall -Wextra -Wshadow -Wunreachable-code -Wredundant-decls \
-Wmissing-declarations -Wold-style-definition \
-Wmissing-prototypes -Wdeclaration-after-statement \
-Wno-return-local-addr -Wunsafe-loop-optimizations \
-Wuninitialized -Werror -Wno-unused-parameter \
-Wno-string-compare -Wno-stringop-overflow \
-Wno-stringop-overread -Wno-stringop-truncation
PROG1 = ASCIIlosaurus_server
PROG2 = ASCIIlosaurus_client
TAR_FILE = Lab7_${LOGNAME}.tar.gz
all: $(PROG1) $(PROG2)
$(PROG1): $(PROG1).o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
$(PROG1).o: $(PROG1).c ASCIIlosaurus_world.h
$(CC) $(CFLAGS) -c $<
$(PROG2): $(PROG2).o ASCIIlosaurus_world.o
$(CC) $(CFLAGS) -o $@ $^ -lncurses
$(PROG2).o: $(PROG2).c ASCIIlosaurus_world.h
$(CC) $(CFLAGS) -c $<
ASCIIlosaurus_world.o: ASCIIlosaurus_world.c ASCIIlosaurus_world.h
$(CC) $(CFLAGS) -c ASCIIlosaurus_world.c
clean:
rm -f $(PROG1) $(PROG2) *.o *~ \#*
tar: clean
rm -f $(TAR_FILE)
tar cvfa $(TAR_FILE) *.[ch] ?akefile