forked from pharpala/HashTableLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
55 lines (37 loc) · 1.07 KB
/
makefile
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
52
53
54
## explicitly add debugger support to each file compiled,
## and turn on all warnings.
CFLAGS = -g -Wall -Iaalib -I.
##
## We can define variables for values we will use repeatedly below
##
## define the executables we want to build
A3EXE = a3
## define the set of object files we need to build each executable
A3OBJS = \
data-reader.o \
mainline.o
AALIB = libAA.a
AALIBOBJS = \
aalib/hash-functions.o \
aalib/hash-table.o \
aalib/primes.o
CC = gcc
##
## TARGETS: below here we describe the target dependencies and rules
##
all: $(A3EXE)
$(A3EXE): $(A3OBJS) $(AALIB)
$(CC) $(CFLAGS) -o $(A3EXE) $(A3OBJS) $(AALIB)
## The ar(1) tool is used to create static libraries. On Linux
## this is still the tool to use, equivalent to libtool(1).
$(AALIB): $(AALIBOBJS)
ar rcs $(AALIB) $(AALIBOBJS)
## convenience target to remove the results of a build
clean :
- rm -f $(A3OBJS) $(A3EXE)
- rm -f $(AALIBOBJS) $(AALIB)
## tags -- editor support for function definitions
tags : dummy
ctags *.c aalib/*.c
## a "dummy" dependency forces its parent to run always
dummy :