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
) \
46 EXE_OBJS
= $(PLAF_EXE_OBJS
)
49 $(MAKE
) `./build-support/factor.sh make-target`
52 @echo
"Run '$(MAKE)' with one of the following parameters:"
54 @echo
"freebsd-x86-32"
55 @echo
"freebsd-x86-64"
60 @echo
"openbsd-x86-32"
61 @echo
"openbsd-x86-64"
67 @echo
"solaris-x86-32"
68 @echo
"solaris-x86-64"
73 @echo
"Additional modifiers:"
75 @echo
"DEBUG=1 compile VM with debugging information"
76 @echo
"SITE_CFLAGS=... additional optimization flags"
77 @echo
"NO_UI=1 don't link with X11 libraries (ignored on Mac OS X)"
78 @echo
"X11=1 force link with X11 libraries instead of Cocoa (only on Mac OS X)"
81 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.openbsd.x86.32
84 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.openbsd.x86.64
87 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.freebsd.x86.32
90 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.freebsd.x86.64
93 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.netbsd.x86.32
96 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.netbsd.x86.64
99 ln
-sf libfreetype
.6.dylib \
100 Factor.app
/Contents
/Frameworks
/libfreetype.dylib
102 macosx-ppc
: macosx-freetype
103 $(MAKE
) $(EXECUTABLE
) macosx.app CONFIG
=vm
/Config.macosx.ppc
105 macosx-x86-32
: macosx-freetype
106 $(MAKE
) $(EXECUTABLE
) macosx.app CONFIG
=vm
/Config.macosx.x86.32
108 macosx-x86-64
: macosx-freetype
109 $(MAKE
) $(EXECUTABLE
) macosx.app CONFIG
=vm
/Config.macosx.x86.64
112 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.x86.32
115 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.x86.64
118 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.ppc
121 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.linux.arm
124 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.solaris.x86.32
127 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.solaris.x86.64
130 wget http
://factorcode.org
/dlls
/freetype6.dll
131 chmod
755 freetype6.dll
134 wget http
://factorcode.org
/dlls
/zlib1.dll
137 winnt-x86-32
: freetype6.dll zlib1.dll
138 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.windows.nt.x86.32
141 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.windows.nt.x86.64
144 $(MAKE
) $(EXECUTABLE
) CONFIG
=vm
/Config.windows.ce.arm
147 mkdir
-p
$(BUNDLE
)/Contents
/MacOS
148 mv
$(EXECUTABLE
) $(BUNDLE
)/Contents
/MacOS
/factor
149 ln
-s Factor.app
/Contents
/MacOS
/factor .
/factor
150 cp
$(ENGINE
) $(BUNDLE
)/Contents
/Frameworks
153 -change libfactor.dylib \
154 @executable_path
/..
/Frameworks
/libfactor.dylib \
155 Factor.app
/Contents
/MacOS
/factor
157 factor
: $(DLL_OBJS
) $(EXE_OBJS
)
158 $(LINKER
) $(ENGINE
) $(DLL_OBJS
)
159 $(CC
) $(LIBS
) $(LIBPATH
) -L.
$(LINK_WITH_ENGINE
) \
160 $(CFLAGS
) -o
$@
$(EXE_SUFFIX
)$(EXE_EXTENSION
) $(EXE_OBJS
)
164 rm -f factor
*.dll libfactor.
{a
,so
,dylib
}
167 $(WINDRES
) vm
/factor.rs vm
/resources.o
170 $(CC
) -c
$(CFLAGS
) -o
$@
$<
173 $(CC
) -x assembler-with-cpp
-c
$(CFLAGS
) -o
$@
$<
176 $(CC
) -c
$(CFLAGS
) -o
$@
$<