10 LIBPATH
= -L
/usr
/X11R6
/lib
16 CFLAGS
+= -O3
$(SITE_CFLAGS
)
23 ENGINE
= $(DLL_PREFIX
)factor
$(DLL_SUFFIX
)$(DLL_EXTENSION
)
25 DLL_OBJS
= $(PLAF_DLL_OBJS
) \
48 EXE_OBJS
= $(PLAF_EXE_OBJS
)
51 $(MAKE
) `./build-support/factor.sh make-target`
54 @echo
"Run '$(MAKE)' with one of the following parameters:"
56 @echo
"freebsd-x86-32"
57 @echo
"freebsd-x86-64"
62 @echo
"openbsd-x86-32"
63 @echo
"openbsd-x86-64"
69 @echo
"solaris-x86-32"
70 @echo
"solaris-x86-64"
75 @echo
"Additional modifiers:"
77 @echo
"DEBUG=1 compile VM with debugging information"
78 @echo
"SITE_CFLAGS=... additional optimization flags"
79 @echo
"NO_UI=1 don't link with X11 libraries (ignored on Mac OS X)"
80 @echo
"X11=1 force link with X11 libraries instead of Cocoa (only on Mac OS X)"
83 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.openbsd.x86.32
86 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.openbsd.x86.64
89 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.freebsd.x86.32
92 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.freebsd.x86.64
95 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.netbsd.x86.32
98 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.netbsd.x86.64
101 ln
-sf libfreetype
.6.dylib \
102 Factor.app
/Contents
/Frameworks
/libfreetype.dylib
104 macosx-ppc
: macosx-freetype
105 $(MAKE
) $(EXECUTABLE
) macosx.app CONFIG
=vm
/Config.macosx.ppc
107 macosx-x86-32
: macosx-freetype
108 $(MAKE
) $(EXECUTABLE
) macosx.app CONFIG
=vm
/Config.macosx.x86.32
110 macosx-x86-64
: macosx-freetype
111 $(MAKE
) $(EXECUTABLE
) macosx.app CONFIG
=vm
/Config.macosx.x86.64
114 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.x86.32
117 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.x86.64
120 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.ppc
123 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.arm
126 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.solaris.x86.32
129 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.solaris.x86.64
132 wget http
://factorcode.org
/dlls
/freetype6.dll
133 chmod
755 freetype6.dll
136 wget http
://factorcode.org
/dlls
/zlib1.dll
139 winnt-x86-32
: freetype6.dll zlib1.dll
140 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.windows.nt.x86.32
143 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.windows.nt.x86.64
146 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.windows.ce.arm
149 mkdir
-p
$(BUNDLE
)/Contents
/MacOS
150 mv
$(EXECUTABLE
) $(BUNDLE
)/Contents
/MacOS
/factor
151 ln
-s Factor.app
/Contents
/MacOS
/factor .
/factor
152 cp
$(ENGINE
) $(BUNDLE
)/Contents
/Frameworks
155 -change libfactor.dylib \
156 @executable_path
/..
/Frameworks
/libfactor.dylib \
157 Factor.app
/Contents
/MacOS
/factor
159 factor
: $(DLL_OBJS
) $(EXE_OBJS
)
160 $(LINKER
) $(ENGINE
) $(DLL_OBJS
)
161 $(CC
) $(LIBS
) $(LIBPATH
) -L.
$(LINK_WITH_ENGINE
) \
162 $(CFLAGS
) -o
$@
$(EXE_SUFFIX
)$(EXE_EXTENSION
) $(EXE_OBJS
)
166 rm -f factor
*.dll libfactor.
{a
,so
,dylib
}
169 $(WINDRES
) vm
/factor.rs vm
/resources.o
172 $(CC
) -c
$(CFLAGS
) -o
$@
$<
175 $(CC
) -x assembler-with-cpp
-c
$(CFLAGS
) -o
$@
$<
178 $(CC
) -c
$(CFLAGS
) -o
$@
$<