Mercurial > hg > forks > dxa
annotate Makefile @ 16:a2a81589380d default tip
Reformat the whole source via clang-format for better consistency.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 14 Oct 2021 01:53:20 +0300 |
parents | 84c0facfc43c |
children |
rev | line source |
---|---|
0 | 1 # dxa makefile |
2 # marko's originally, hacked up by cameron | |
3 | |
3
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
4 TARGETS = dxa |
0 | 5 OBJECTS = scan.o vector.o dump.o table.o label.o main.o |
14
84c0facfc43c
Merge changes from upstream v0.1.4.
Matti Hamalainen <ccr@tnsp.org>
parents:
13
diff
changeset
|
6 DXA_VERSION = 0.1.4++ |
0 | 7 |
8 # choose the compiler and flags | |
9 | |
10 CC = gcc | |
5
b91c47026822
Make version information a compile-time define.
Matti Hamalainen <ccr@tnsp.org>
parents:
3
diff
changeset
|
11 CFLAGS = -g -O2 -W -Wall -DDXA_VERSION="\"$(DXA_VERSION)\"" |
3
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
12 INSTALL = install |
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
13 PREFIX = /usr/local |
0 | 14 |
15 #CC = cc | |
16 #CFLAGS = -O | |
17 #CFLAGS = -O2 | |
18 | |
3
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
19 all: $(TARGETS) |
0 | 20 |
3
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
21 dxa : $(OBJECTS) |
0 | 22 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) |
23 | |
24 scan.o : structures.h proto.h options.h opcodes.h | |
25 vector.o : structures.h proto.h options.h | |
26 dump.o : structures.h proto.h options.h opcodes.h | |
27 table.o : structures.h proto.h | |
28 label.o : structures.h proto.h | |
29 main.o : structures.h proto.h options.h opcodes.h | |
30 | |
31 clean: | |
3
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
32 rm -f $(OBJECTS) $(TARGETS) core |
0 | 33 |
34 dist: clean | |
5
b91c47026822
Make version information a compile-time define.
Matti Hamalainen <ccr@tnsp.org>
parents:
3
diff
changeset
|
35 cd .. && tar cvf $dxa-$(DXA_VERSION).tar dxa-$(DXA_VERSION) && xz -9 dxa-$(DXA_VERSION).tar |
3
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
36 |
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
37 install: all |
a07eb3757bf0
Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
38 @for fn in $(TARGETS); do echo " INSTALL $$fn $(PREFIX)/bin/"; $(INSTALL) -m 755 "$$fn" $(PREFIX)/bin/; done |