Skip to content
Newer
Older
100755 221 lines (172 sloc) 4.85 KB
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
1 ifdef CONFIG
2 CC = gcc
3 CPP = g++
a96457c Initial import
Slava Pestov authored
4
6d2c78a Bump version number to 0.94
Slava Pestov authored
5 VERSION = 0.94
3db6805 @phildawes Added -DREENTRANT option to Makefile
phildawes authored
6
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
7 BUNDLE = Factor.app
8 LIBPATH = -L/usr/X11R6/lib
6b5b839 Makefile: add SITE_CFLAGS even if DEBUG=1
Slava Pestov authored
9
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
10 CFLAGS = -Wall $(SITE_CFLAGS)
11
12 ifdef DEBUG
13 CFLAGS += -g -DFACTOR_DEBUG
14 else
15 CFLAGS += -O3
16 endif
a96457c Initial import
Slava Pestov authored
17
4019752 remove hacks from the makefile and build-support
unknown authored
18 include $(CONFIG)
19
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
20 ENGINE = $(DLL_PREFIX)factor$(DLL_SUFFIX)$(DLL_EXTENSION)
21 EXECUTABLE = factor$(EXE_SUFFIX)$(EXE_EXTENSION)
22 CONSOLE_EXECUTABLE = factor$(EXE_SUFFIX)$(CONSOLE_EXTENSION)
23
24 DLL_OBJS = $(PLAF_DLL_OBJS) \
25 vm/aging_collector.o \
26 vm/alien.o \
27 vm/arrays.o \
28 vm/bignum.o \
29 vm/booleans.o \
30 vm/byte_arrays.o \
31 vm/callbacks.o \
32 vm/callstack.o \
33 vm/code_blocks.o \
34 vm/code_heap.o \
35 vm/compaction.o \
36 vm/contexts.o \
37 vm/data_heap.o \
38 vm/data_heap_checker.o \
39 vm/debug.o \
40 vm/dispatch.o \
41 vm/entry_points.o \
42 vm/errors.o \
43 vm/factor.o \
44 vm/free_list.o \
45 vm/full_collector.o \
46 vm/gc.o \
a08295d GC maps for more compact inline GC checks
Slava Pestov authored
47 vm/gc_info.o \
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
48 vm/image.o \
49 vm/inline_cache.o \
50 vm/instruction_operands.o \
51 vm/io.o \
52 vm/jit.o \
53 vm/math.o \
a1caf9e vm: split up TLS code and add a dummy implementation for a dummy OS k…
Slava Pestov authored
54 vm/mvm.o \
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
55 vm/nursery_collector.o \
56 vm/object_start_map.o \
57 vm/objects.o \
58 vm/primitives.o \
59 vm/profiler.o \
60 vm/quotations.o \
61 vm/run.o \
62 vm/strings.o \
63 vm/to_tenured_collector.o \
64 vm/tuples.o \
65 vm/utilities.o \
66 vm/vm.o \
67 vm/words.o
68
69 EXE_OBJS = $(PLAF_EXE_OBJS)
70
71 FFI_TEST_LIBRARY = libfactor-ffi-test$(SHARED_DLL_EXTENSION)
72
73 TEST_OBJS = vm/ffi_test.o
74 endif
97283b9 compile an ffi test library, reduce factor runtime by 6kb!
Doug Coleman authored
75
cb3fdc5 fix the Makefile and make targets
erg authored
76 default:
ad0e11d fix makefile
erg authored
77 $(MAKE) `./build-support/factor.sh make-target`
06511db Makefile: default rule builds via autodetection
Eduardo Cavazos authored
78
79 help:
dcda3d5 Fix FreeBSD
sheeple authored
80 @echo "Run '$(MAKE)' with one of the following parameters:"
a96457c Initial import
Slava Pestov authored
81 @echo ""
6dc2886 More build system work
Slava authored
82 @echo "freebsd-x86-32"
83 @echo "freebsd-x86-64"
84 @echo "linux-x86-32"
85 @echo "linux-x86-64"
1ed2bc6 @erikcharlebois 32 and 64 bit Linux PPC support
erikcharlebois authored
86 @echo "linux-ppc-32"
87 @echo "linux-ppc-64"
a96457c Initial import
Slava Pestov authored
88 @echo "linux-arm"
6dc2886 More build system work
Slava authored
89 @echo "openbsd-x86-32"
90 @echo "openbsd-x86-64"
ac2fb04 @dne Add NetBSD support
dne authored
91 @echo "netbsd-x86-32"
92 @echo "netbsd-x86-64"
6dc2886 More build system work
Slava authored
93 @echo "macosx-x86-32"
4dec62a macosx-x86-64
Daniel Ehrenberg authored
94 @echo "macosx-x86-64"
a96457c Initial import
Slava Pestov authored
95 @echo "macosx-ppc"
6dc2886 More build system work
Slava authored
96 @echo "solaris-x86-32"
97 @echo "solaris-x86-64"
20e4fce Make OS name more consistent for extra/builder
Slava Pestov authored
98 @echo "winnt-x86-32"
8d3ac25 @erg Merge git://factorcode.org/git/factor
erg authored
99 @echo "winnt-x86-64"
a96457c Initial import
Slava Pestov authored
100 @echo ""
101 @echo "Additional modifiers:"
102 @echo ""
103 @echo "DEBUG=1 compile VM with debugging information"
104 @echo "SITE_CFLAGS=... additional optimization flags"
105 @echo "NO_UI=1 don't link with X11 libraries (ignored on Mac OS X)"
106 @echo "X11=1 force link with X11 libraries instead of Cocoa (only on Mac OS X)"
107
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
108 ALL = factor factor-ffi-test factor-lib
109
6dc2886 More build system work
Slava authored
110 openbsd-x86-32:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
111 $(MAKE) $(ALL) CONFIG=vm/Config.openbsd.x86.32
a96457c Initial import
Slava Pestov authored
112
6dc2886 More build system work
Slava authored
113 openbsd-x86-64:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
114 $(MAKE) $(ALL) CONFIG=vm/Config.openbsd.x86.64
a96457c Initial import
Slava Pestov authored
115
6dc2886 More build system work
Slava authored
116 freebsd-x86-32:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
117 $(MAKE) $(ALL) CONFIG=vm/Config.freebsd.x86.32
a96457c Initial import
Slava Pestov authored
118
6dc2886 More build system work
Slava authored
119 freebsd-x86-64:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
120 $(MAKE) $(ALL) CONFIG=vm/Config.freebsd.x86.64
a96457c Initial import
Slava Pestov authored
121
ac2fb04 @dne Add NetBSD support
dne authored
122 netbsd-x86-32:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
123 $(MAKE) $(ALL) CONFIG=vm/Config.netbsd.x86.32
ac2fb04 @dne Add NetBSD support
dne authored
124
125 netbsd-x86-64:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
126 $(MAKE) $(ALL) CONFIG=vm/Config.netbsd.x86.64
ac2fb04 @dne Add NetBSD support
dne authored
127
80860f6 remove dead freetype code from Makefile
Doug Coleman authored
128 macosx-ppc:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
129 $(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.ppc
a96457c Initial import
Slava Pestov authored
130
80860f6 remove dead freetype code from Makefile
Doug Coleman authored
131 macosx-x86-32:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
132 $(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.x86.32
a96457c Initial import
Slava Pestov authored
133
80860f6 remove dead freetype code from Makefile
Doug Coleman authored
134 macosx-x86-64:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
135 $(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.x86.64
4dec62a macosx-x86-64
Daniel Ehrenberg authored
136
6dc2886 More build system work
Slava authored
137 linux-x86-32:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
138 $(MAKE) $(ALL) CONFIG=vm/Config.linux.x86.32
a96457c Initial import
Slava Pestov authored
139
6dc2886 More build system work
Slava authored
140 linux-x86-64:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
141 $(MAKE) $(ALL) CONFIG=vm/Config.linux.x86.64
a96457c Initial import
Slava Pestov authored
142
1ed2bc6 @erikcharlebois 32 and 64 bit Linux PPC support
erikcharlebois authored
143 linux-ppc-32:
144 $(MAKE) $(ALL) CONFIG=vm/Config.linux.ppc.32
145
146 linux-ppc-64:
147 $(MAKE) $(ALL) CONFIG=vm/Config.linux.ppc.64
a96457c Initial import
Slava Pestov authored
148
149 linux-arm:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
150 $(MAKE) $(ALL) CONFIG=vm/Config.linux.arm
a96457c Initial import
Slava Pestov authored
151
6dc2886 More build system work
Slava authored
152 solaris-x86-32:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
153 $(MAKE) $(ALL) CONFIG=vm/Config.solaris.x86.32
a96457c Initial import
Slava Pestov authored
154
6dc2886 More build system work
Slava authored
155 solaris-x86-64:
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
156 $(MAKE) $(ALL) CONFIG=vm/Config.solaris.x86.64
a96457c Initial import
Slava Pestov authored
157
4019752 remove hacks from the makefile and build-support
unknown authored
158 winnt-x86-32:
0563304 GNUmakefile: fix on Windows
Slava Pestov authored
159 $(MAKE) $(ALL) CONFIG=vm/Config.windows.x86.32
160 $(MAKE) factor-console CONFIG=vm/Config.windows.x86.32
a96457c Initial import
Slava Pestov authored
161
4019752 remove hacks from the makefile and build-support
unknown authored
162 winnt-x86-64:
0563304 GNUmakefile: fix on Windows
Slava Pestov authored
163 $(MAKE) $(ALL) CONFIG=vm/Config.windows.x86.64
164 $(MAKE) factor-console CONFIG=vm/Config.windows.x86.64
bc3bf6b @erg make factor compile on win64
erg authored
165
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
166 ifdef CONFIG
a96457c Initial import
Slava Pestov authored
167
168 macosx.app: factor
d1b70d8 Mac OS X/x86 fixes
Slava authored
169 mkdir -p $(BUNDLE)/Contents/MacOS
b34877f Makefile creates Factor.app/Contents/Frameworks/ if it doesn't alread…
Slava Pestov authored
170 mkdir -p $(BUNDLE)/Contents/Frameworks
76d70f2 Makefile: ./factor is a symlink to ./Factor.app/Contents/MacOS/factor
Eduardo Cavazos authored
171 mv $(EXECUTABLE) $(BUNDLE)/Contents/MacOS/factor
172 ln -s Factor.app/Contents/MacOS/factor ./factor
4019752 remove hacks from the makefile and build-support
unknown authored
173
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
174 $(ENGINE): $(DLL_OBJS)
37e8ab4 @phildawes Added TOOLCHAIN_PREFIX var to makefile
phildawes authored
175 $(TOOLCHAIN_PREFIX)$(LINKER) $(ENGINE) $(DLL_OBJS)
200ece4 @erg Better fix for building dll on WIndows
erg authored
176
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
177 factor-lib: $(ENGINE)
178
7bb82e0 @jckarter statically link factor executable to VM so dylib is only needed for e…
jckarter authored
179 factor: $(EXE_OBJS) $(DLL_OBJS)
180 $(TOOLCHAIN_PREFIX)$(CPP) $(LIBS) $(LIBPATH) -L. $(DLL_OBJS) \
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
181 $(CFLAGS) -o $(EXECUTABLE) $(EXE_OBJS)
a96457c Initial import
Slava Pestov authored
182
7bb82e0 @jckarter statically link factor executable to VM so dylib is only needed for e…
jckarter authored
183 factor-console: $(EXE_OBJS) $(DLL_OBJS)
184 $(TOOLCHAIN_PREFIX)$(CPP) $(LIBS) $(LIBPATH) -L. $(DLL_OBJS) \
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
185 $(CFLAGS) $(CFLAGS_CONSOLE) -o $(CONSOLE_EXECUTABLE) $(EXE_OBJS)
2d960f4 @erg Create two binaries: factor.com and factor.exe. factor.com is the con…
erg authored
186
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
187 factor-ffi-test: $(FFI_TEST_LIBRARY)
200ece4 @erg Better fix for building dll on WIndows
erg authored
188
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
189 $(FFI_TEST_LIBRARY): vm/ffi_test.o
190 $(TOOLCHAIN_PREFIX)$(CC) $(LIBPATH) $(CFLAGS) $(FFI_TEST_CFLAGS) $(SHARED_FLAG) -o $(FFI_TEST_LIBRARY) $(TEST_OBJS)
7820d88 Various VM cleanups, new approach for bignum GC root registration
Slava Pestov authored
191
938d1a4 Move vmpp to vm
Slava Pestov authored
192 vm/resources.o:
37e8ab4 @phildawes Added TOOLCHAIN_PREFIX var to makefile
phildawes authored
193 $(TOOLCHAIN_PREFIX)$(WINDRES) vm/factor.rs vm/resources.o
a96457c Initial import
Slava Pestov authored
194
938d1a4 Move vmpp to vm
Slava Pestov authored
195 vm/ffi_test.o: vm/ffi_test.c
37e8ab4 @phildawes Added TOOLCHAIN_PREFIX var to makefile
phildawes authored
196 $(TOOLCHAIN_PREFIX)$(CC) -c $(CFLAGS) $(FFI_TEST_CFLAGS) -o $@ $<
9daf3d2 @erg fix the makefile for linux64 ffi_test
erg authored
197
7274aff Porting VM to C++
Slava Pestov authored
198 .cpp.o:
37e8ab4 @phildawes Added TOOLCHAIN_PREFIX var to makefile
phildawes authored
199 $(TOOLCHAIN_PREFIX)$(CPP) -c $(CFLAGS) -o $@ $<
7274aff Porting VM to C++
Slava Pestov authored
200
b7f4447 Starting to update PowerPC backend for recent VM changes (untested)
Slava Pestov authored
201 .S.o:
1ed2bc6 @erikcharlebois 32 and 64 bit Linux PPC support
erikcharlebois authored
202 $(TOOLCHAIN_PREFIX)$(CC) -c $(CFLAGS) -o $@ $<
b7f4447 Starting to update PowerPC backend for recent VM changes (untested)
Slava Pestov authored
203
7274aff Porting VM to C++
Slava Pestov authored
204 .mm.o:
37e8ab4 @phildawes Added TOOLCHAIN_PREFIX var to makefile
phildawes authored
205 $(TOOLCHAIN_PREFIX)$(CPP) -c $(CFLAGS) -o $@ $<
8c5b037 Working on new method dispatch system
Slava Pestov authored
206
7274aff Porting VM to C++
Slava Pestov authored
207 .SUFFIXES: .mm
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
208
209 endif
210
211 clean:
212 rm -f vm/*.o
213 rm -f factor.dll
cd89e2e @erg Delete .lib objects from Visual Studio if they exist. gcc doesn't bui…
erg authored
214 rm -f factor.lib
215 rm -f factor.dll.lib
5f207cd GNUmakefile: some more cleanups
Slava Pestov authored
216 rm -f libfactor.*
217 rm -f libfactor-ffi-test.*
218 rm -f Factor.app/Contents/Frameworks/libfactor.dylib
219
21e291c @jckarter GNUmakefile: build factor shared library by default again
jckarter authored
220 .PHONY: factor factor-lib factor-console factor-ffi-test tags clean macosx.app
Something went wrong with that request. Please try again.