-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (17 loc) · 671 Bytes
/
Makefile
File metadata and controls
27 lines (17 loc) · 671 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
.PHONY: all, clean
CCFLAGS = -Wall -Wextra -Wvla -Werror -g -lm -std=c99
all: libhashmap.a libhashmap_tests.a
libhashmap.a: pair.o vector.o hashmap.o
ar rcs libhashmap.a pair.o vector.o hashmap.o
libhashmap_tests.a: test_suite.o hashmap.o pair.o vector.o
ar rcs libhashmap_tests.a test_suite.o hashmap.o pair.o vector.o
pair.o: pair.c pair.h
gcc -c $(CCFLAGS) pair.c -o pair.o
vector.o: vector.c vector.h
gcc -c $(CCFLAGS) vector.c -o vector.o
hashmap.o: hashmap.c hashmap.h
gcc -c $(CCFLAGS) hashmap.c -o hashmap.o
test_suite.o: test_suite.c test_suite.h pair.h hash_funcs.h test_pairs.h
gcc -c $(CCFLAGS) test_suite.c -o test_suite.o
clean:
rm *.o *.a