-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
85 lines (61 loc) · 1.8 KB
/
Makefile.in
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Standard Configuration Options
## User Overridable variables
CC=@CC@
CFLAGS=@CFLAGS@
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@
SED=@SED@
INSTALL=@INSTALL@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
libexecdir=@libexecdir@
includedir=@includedir@
datarootdir=@datarootdir@
datadir=@datadir@
docdir=@docdir@
mandir=@mandir@
infodir=@infodir@
sysconfdir=@sysconfdir@
sharedstatedir=@sharedstatedir@
localstatedir=@localstatedir@
## Do not override
srcdir=@srcdir@
builddir=@builddir@
EXTRA_CFLAGS=-std=c11
EXTRA_CXXFLAGS=-std=c++20
EXTRA_LDFLAGS=
EXTRA_CPPFLAGS=
LIBS=
INCLUDEDIRS=include cpp-unicodelib
OUTPUT=trustc
OBJECTS = main.o lex.o unicode.o
# Rules
.PHONY: all install clean install-strip distclean
# Use lc-standard stamp protocol
all:
+$(MAKE) stamp
stamp: $(OUTPUT)
touch stamp
$(OUTPUT): $(OBJECTS)
$(CXX) $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LIBS:%=-l%) -o$@ $^
include $(OBJECTS:.o=.o.d)
@builddir@/%.o.d: @srcdir@/src/%.cxx
$(CXX) -MM $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(INCLUDEDIRS:%=-I$(srcdir)/%) -o$@ $<
@builddir@/%.o: @srcdir@/src/%.cxx | @builddir@/%.o.d
$(CXX) -c $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(INCLUDEDIRS:%=-I$(srcdir)/%) -o$@ $<
@builddir@/%.o.d: @srcdir@/src/%.c
$(CC) -MM $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(INCLUDEDIRS:%=-I$(srcdir)/%) -o$@ $<
@builddir@/%.o: @srcdir@/src/%.c | @builddir@/%.o.d
$(CC) -c $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDEDIRS:%=-I$(srcdir)/%) -o$@ $<
clean:
rm -f $(OBJECTS) $(OBJECTS:.o=.o.d) $(OUTPUT) stamp
distclean: clean
rm -f config.status config.log Makefile
install:
$(INSTALL) -m755 $(bindir) $(OUTPUT)
install-strip:
$(INSTALL) -sm755 $(bindir) $(OUTPUT)