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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 # dxa makefile
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 # marko's originally, hacked up by cameron
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
3
a07eb3757bf0 Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
4 TARGETS = dxa
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 # choose the compiler and flags
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #CC = cc
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 #CFLAGS = -O
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 #CFLAGS = -O2
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
3
a07eb3757bf0 Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
19 all: $(TARGETS)
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20
3
a07eb3757bf0 Improve the makefile very slightly.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
21 dxa : $(OBJECTS)
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 $(CC) $(LDFLAGS) -o $@ $(OBJECTS)
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 scan.o : structures.h proto.h options.h opcodes.h
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 vector.o : structures.h proto.h options.h
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 dump.o : structures.h proto.h options.h opcodes.h
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 table.o : structures.h proto.h
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 label.o : structures.h proto.h
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 main.o : structures.h proto.h options.h opcodes.h
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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