-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 673 Bytes
/
Makefile
File metadata and controls
42 lines (30 loc) · 673 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
.PHONY: all test benchmark install clean
prefix = /usr/local
exec_prefix = $(prefix)
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
CC = cc
CFLAGS = -std=c89 -pedantic-errors
INSTALL = install
ALL = libaca.a aca.o
all: $(ALL)
aca.o: aca.c aca.h
$(CC) $(CFLAGS) -c -o $@ $<
libaca.a: aca.o
ar -cr $@ $^
run.tmp: aca.o aca.h test.c
$(CC) $(CFLAGS) -o $@ aca.o test.c
naive/run.tmp:
(cd naive && make)
test: run.tmp
./runtest
benchmark: test
(cd naive; make test)
./benchmark
install: all
$(INSTALL) -d $(includedir) $(libdir)
$(INSTALL) aca.h $(includedir)/
$(INSTALL) libaca.a $(libdir)/
clean:
rm -rf $(ALL) *.tmp
(cd naive; make clean)