-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (28 loc) · 895 Bytes
/
Makefile
File metadata and controls
44 lines (28 loc) · 895 Bytes
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
# ***
# *** DO NOT modify this file
# ***
WARNING = -Wall -Wshadow --pedantic -Wno-unused-variable
ERROR = -Wvla -Werror
GCC = gcc -std=c99 -g $(WARNING) $(ERROR)
TESTFALGS = -DTEST_COUNTCHAR -DTEST_PRINTCOUNTS
SRCS = main.c filechar.c
OBJS = $(SRCS:%.c=%.o)
%.o : %.c
$(GCC) $(TESTFALGS) -c $*.c -o $@
test1: hw04
./hw04 inputs/2016 > output16
diff output16 expected/expected16 && echo [passed] test1
test2: hw04
./hw04 inputs/2017 > output17
diff output17 expected/expected17 && echo [passed] test2
test3: hw04
./hw04 inputs/2018 > output18
diff output18 expected/expected18 && echo [passed] test3
test4: hw04
./hw04 inputs/2019 > output19
diff output19 expected/expected19 && echo [passed] test4
hw04: $(OBJS)
$(GCC) $(TESTFALGS) $(OBJS) -o hw04
testall: test1 test2 test3 test4
clean: # remove all machine generated files
rm -f hw04 *.o *.ident_yaml output??