-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (32 loc) · 732 Bytes
/
Makefile
File metadata and controls
49 lines (32 loc) · 732 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
43
44
45
46
47
48
49
# Makefile
#
# pem 2001-05-12
#
#
CC=gcc -std=c11
#CCOPTS=-Wpedantic -Wall -Wextra
CCOPTS=-Wpedantic -Wall -Wextra -Werror
#CCDEFS=-D__EXTENSIONS__
CCDEFS=-D_POSIX_C_SOURCE=200809L
#CFLAGS=-g -DDEBUG $(CCOPTS) $(CCDEFS)
CFLAGS=-O2 -fomit-frame-pointer $(CCOPTS) $(CCDEFS)
#CFLAGS=-O2 -pg $(CCOPTS) $(CCDEFS)
#LDFLAGS=-pg
PROG=htabtest htabunit
LIB=libhashtable.a
SRC=hashtable.c htabtest.c htabunit.c
OBJ=$(SRC:%.c=%.o)
all: $(PROG) $(LIB)
htabtest: htabtest.o $(LIB)
htabunit: htabunit.o $(LIB)
$(LIB): hashtable.o
rm -f $(LIB)
$(AR) qc $(LIB) hashtable.o
ranlib $(LIB)
clean:
$(RM) $(OBJ) core
cleanall: clean
$(RM) $(PROG) $(LIB) make.deps
make.deps:
gcc -MM $(CFLAGS) $(SRC) > make.deps
include make.deps