-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
62 lines (53 loc) · 1.41 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
55
56
57
58
59
60
61
# Copyright (C) 1999-2012 Core Technologies.
#
# This file is part of tpasm.
#
# tpasm is free software; you can redistribute it and/or modify
# it under the terms of the tpasm LICENSE AGREEMENT.
#
# tpasm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# tpasm LICENSE AGREEMENT for more details.
#
# You should have received a copy of the tpasm LICENSE AGREEMENT
# along with tpasm; see the file "LICENSE.TXT".
INCLUDES=-I.
# new gnu compilers have a really annoying default behavior of wrapping
# error message lines. The default should be NO-WRAPPING.
OPTIONS=-O3 -Wall -x c++ -fmessage-length=0 -fno-exceptions
CFLAGS=$(INCLUDES) $(OPTIONS)
OBJECTS = \
globals.o \
tpasm.o \
memory.o \
files.o \
symbols.o \
label.o \
segment.o \
pseudo.o \
parser.o \
expression.o \
context.o \
alias.o \
macro.o \
listing.o \
outfile.o \
processors.o \
support.o \
$(patsubst %.c,%.o,$(wildcard outfiles/*.c)) \
$(patsubst %.c,%.o,$(wildcard processors/*.c))
all : tpasm
tpasm : $(OBJECTS)
$(CC) -O $(OBJECTS) -lstdc++ -o tpasm
clean :
rm -f *.o
rm -f outfiles/*.o
rm -f processors/*.o
rm -f tpasm
install :
cp tpasm /usr/local/bin
# suffix rules (this makes sure that the ".o" files
# end up in their respective directories on all systems)
.c.o:
${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $<