Skip to content
Newer
Older
100644 143 lines (101 sloc) 3.56 KB
02bdd61 @NotFound First published release
authored Oct 22, 2009
1 # Makefile for Winxed
2
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
3 #-----------------------------------------------------------------------
4 # Modify this section to meet your operating system conventions and
5 # compiler used.
6
02bdd61 @NotFound First published release
authored Oct 22, 2009
7 CXX = g++
fb77306 @NotFound put Emit class in a separate file, add clean target and drop -Wextra …
authored Nov 7, 2009
8 CFLAGS = -g -Wall
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
9 OBJEXT = .o
10 EXEEXT =
11
12 #-----------------------------------------------------------------------
13
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
14 default: stage0 driver
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
15
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
16 all: stage2 driver
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
17
18 pbc: winxed.pbc
19
20 help:
21 @echo "Targets:"
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
22 @echo " default - Build the stage 0 and the driver"
23 @echo " stage0 - Build the stage 0 compiler"
24 @echo " stage1 - Build the driver and the stage 1 compiler"
25 @echo " stage2 - Build the driver and the stage 2 compiler"
26 @echo " all - Build all"
27 @echo " driver - Build the compiler driver - native executable"
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
28 @echo " pbc - Build the compiler driver - parrot binary"
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
29 @echo " test - Run the stage 0 tests"
30 @echo " testv - Run the stage 0 tests with -v option"
31 @echo " test1 - Run the stage 1 tests"
32 @echo " test2 - Run the stage 2 tests"
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
33 @echo " help - This message"
34
35 #-----------------------------------------------------------------------
02bdd61 @NotFound First published release
authored Oct 22, 2009
36
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
37 #-------------------------------
38 # Compiler stage 0
39 #-------------------------------
02bdd61 @NotFound First published release
authored Oct 22, 2009
40
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
41 stage0: winxedst0$(EXEEXT)
42
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
43 winxedst0$(EXEEXT): winxedst0$(OBJEXT) token$(OBJEXT) errors$(OBJEXT) predef$(OBJEXT) emit$(OBJEXT)
44 $(CXX) -o winxedst0 winxedst0$(OBJEXT) token$(OBJEXT) errors$(OBJEXT) predef$(OBJEXT) emit$(OBJEXT)
45
46 winxedst0$(OBJEXT): winxedst0.cpp emit.h token.h errors.h predef.h
79d1a18 @NotFound rename winxed.cpp to winxedst0.cpp
authored Nov 21, 2009
47 $(CXX) $(CFLAGS) -c winxedst0.cpp
02bdd61 @NotFound First published release
authored Oct 22, 2009
48
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
49 token$(OBJEXT): token.cpp token.h errors.h
02bdd61 @NotFound First published release
authored Oct 22, 2009
50 $(CXX) $(CFLAGS) -c token.cpp
51
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
52 errors$(OBJEXT): errors.cpp errors.h token.h
02bdd61 @NotFound First published release
authored Oct 22, 2009
53 $(CXX) $(CFLAGS) -c errors.cpp
54
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
55 predef$(OBJEXT): predef.cpp predef.h
31f7a37 @NotFound put predefined functions pir source in predef.cpp
authored Oct 22, 2009
56 $(CXX) $(CFLAGS) -c predef.cpp
57
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
58 emit$(OBJEXT): emit.cpp emit.h token.h
fb77306 @NotFound put Emit class in a separate file, add clean target and drop -Wextra …
authored Nov 7, 2009
59 $(CXX) $(CFLAGS) -c emit.cpp
60
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
61 #-------------------------------
1525388 @NotFound make target to build stage 1
authored Nov 30, 2009
62 # Compiler stage 1
63 #-------------------------------
64
eba7e1e @NotFound build fakecutable with make stage1
authored Dec 19, 2009
65 stage1: winxedst1$(EXEEXT)
1525388 @NotFound make target to build stage 1
authored Nov 30, 2009
66
ae5ec60 @NotFound build stage 1 fakecutable and use it in make test1
authored Dec 19, 2009
67 winxedst1$(EXEEXT): winxedst1.pbc
68 pbc_to_exe winxedst1.pbc
69
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
70 winxedst1.pbc: winxedst1.pir
76712e4 @NotFound add stage2 make target for testing
authored Dec 22, 2009
71 parrot -o winxedst1.pbc winxedst1.pir
72
73 winxedst1.pir: winxed$(EXEEXT) winxedst1.winxed
0d10dca @PacoLinux We have to call the driver from the current dir.
PacoLinux authored Dec 22, 2009
74 ./winxed --stage=0 -c -o winxedst1.pir winxedst1.winxed
76712e4 @NotFound add stage2 make target for testing
authored Dec 22, 2009
75
76 #-------------------------------
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
77 # Compiler stage 2
76712e4 @NotFound add stage2 make target for testing
authored Dec 22, 2009
78 #-------------------------------
79
80 stage2: winxedst2$(EXEEXT)
81
82 winxedst2$(EXEEXT): winxedst2.pbc
83 pbc_to_exe winxedst2.pbc
84
85 winxedst2.pbc: winxedst2.pir
86 parrot -o winxedst2.pbc winxedst2.pir
87
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
88 winxedst2.pir: winxedst1$(EXEEXT) winxedst1.winxed
d4fea7f @PacoLinux basic tests for chr and ord.
PacoLinux authored Jan 4, 2010
89 ./winxed --stage=1 -c -o winxedst2.pir winxedst1.winxed
76712e4 @NotFound add stage2 make target for testing
authored Dec 22, 2009
90
1525388 @NotFound make target to build stage 1
authored Nov 30, 2009
91 #-------------------------------
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
92 # Driver
93 #-------------------------------
94
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
95 driver: winxed$(EXEEXT)
96
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
97 winxed$(EXEEXT): winxed.pbc
98 pbc_to_exe winxed.pbc
99
100 winxed.pbc: winxed.pir
101 parrot -o winxed.pbc winxed.pir
102
103 winxed.pir: winxed.winxed winxedst0$(EXEEXT)
104 ./winxedst0$(EXEEXT) -c winxed.winxed
105
106 #-----------------------------------------------------------------------
107
108 # Useful for some tests
02bdd61 @NotFound First published release
authored Oct 22, 2009
109 %.pir: %.winxed winxed
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
110 ./winxedst0$(EXEEXT) -c $<
02bdd61 @NotFound First published release
authored Oct 22, 2009
111
112
5247a3b @NotFound drop from the stage 0 compiler the options now handled by the driver,…
authored Nov 24, 2009
113 test: winxed.pbc
0a62bda @NotFound start restructuring tests
authored Dec 22, 2009
114 parrot winxed.pbc t/harness -r t/basic t/*.t
3e9fc11 @NotFound Add verbose option to harness and testv Makefile target to use it
authored Oct 26, 2009
115
5247a3b @NotFound drop from the stage 0 compiler the options now handled by the driver,…
authored Nov 24, 2009
116 testv: winxed.pbc
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
117 parrot winxed.pbc t/harness -rv t/basic t/*.t
fb77306 @NotFound put Emit class in a separate file, add clean target and drop -Wextra …
authored Nov 7, 2009
118
5a32626 @NotFound use harness in stage 1 tests
authored Dec 5, 2009
119 TEST1 = \
d4fea7f @PacoLinux basic tests for chr and ord.
PacoLinux authored Jan 4, 2010
120 t/preincdec.t.winxed t/ordchr.t.winxed
5a32626 @NotFound use harness in stage 1 tests
authored Dec 5, 2009
121
ae5ec60 @NotFound build stage 1 fakecutable and use it in make test1
authored Dec 19, 2009
122 test1: winxed$(EXEEXT) winxedst1$(EXEEXT) $(TEST1)
0a62bda @NotFound start restructuring tests
authored Dec 22, 2009
123 parrot winxed.pbc t/harness --stage=1 -r t/basic t/*.t $(TEST1)
fb77306 @NotFound put Emit class in a separate file, add clean target and drop -Wextra …
authored Nov 7, 2009
124
b568ceb @NotFound add Makefile target test2 for testing stage 2
authored Dec 24, 2009
125 test2: winxed$(EXEEXT) winxedst2$(EXEEXT) $(TEST1)
126 parrot winxed.pbc t/harness --stage=2 -r t/basic t/*.t $(TEST1)
127
fb77306 @NotFound put Emit class in a separate file, add clean target and drop -Wextra …
authored Nov 7, 2009
128 clean:
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
129 rm -f winxedst2$(EXEEXT)
ae5ec60 @NotFound build stage 1 fakecutable and use it in make test1
authored Dec 19, 2009
130 rm -f winxedst1$(EXEEXT)
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
131 rm -f winxedst0$(EXEEXT)
132 rm -f winxedst2.pbc
1525388 @NotFound make target to build stage 1
authored Nov 30, 2009
133 rm -f winxedst1.pbc
8f7486a @NotFound fix and improve Makefile
authored Jan 5, 2010
134 rm -f winxedst2.pir
135 rm -f winxedst1.pir
ba84730 @NotFound fix make clean
authored Nov 24, 2009
136 rm -f winxed$(EXEEXT)
137 rm -f winxed.c
138 rm -f winxed.pbc
139 rm -f winxed.pir
cbe9c55 @NotFound update, improve and self-document Makefile
authored Nov 21, 2009
140 rm -f *$(OBJEXT)
141
142 # Makefile end
Something went wrong with that request. Please try again.