7 DISK_IMAGE_DIR = Factor-$(VERSION)
8 DISK_IMAGE = Factor-$(VERSION).dmg
9 LIBPATH = -L/usr/X11R6/lib
15 CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer $(SITE_CFLAGS)
41 @echo "Run 'make' with one of the following parameters:"
52 @echo "On Unix, pass NO_UI=1 if you don't want to link with the"
53 @echo "X11 and OpenGL libraries."
55 @echo "On Mac OS X, pass X11=1 if you want to link with the"
56 @echo "X11 library instead of Cocoa. You will also need to bootstrap"
57 @echo "Factor with the -no-cocoa -x11 switches."
59 @echo "Also, you might want to set the SITE_CFLAGS environment"
60 @echo "variable to enable some CPU-specific optimizations; this"
61 @echo "can make a huge difference. Eg:"
63 @echo "export SITE_CFLAGS=\"-march=pentium4 -ffast-math\""
66 $(MAKE) $(BINARY) CONFIG=vm/Config.freebsd
69 ln -sf libfreetype.6.dylib \
70 Factor.app/Contents/Frameworks/libfreetype.dylib
72 macosx-ppc: macosx-freetype
73 $(MAKE) $(BINARY) CONFIG=vm/Config.macosx.ppc
75 macosx-x86: macosx-freetype
76 $(MAKE) $(BINARY) CONFIG=vm/Config.macosx
79 $(MAKE) $(BINARY) CONFIG=vm/Config.linux
83 $(MAKE) $(BINARY) CONFIG=vm/Config.linux.amd64
87 $(MAKE) $(BINARY) CONFIG=vm/Config.linux.ppc
90 solaris solaris-x86 solaris-amd64:
91 $(MAKE) $(BINARY) CONFIG=vm/Config.solaris
95 $(MAKE) $(BINARY) CONFIG=vm/Config.windows
98 cp $(BINARY) $(BUNDLE)/Contents/MacOS/Factor
101 -id @executable_path/../Frameworks/libfreetype.6.dylib \
102 Factor.app/Contents/Frameworks/libfreetype.6.dylib
104 -change /usr/X11R6/lib/libfreetype.6.dylib \
105 @executable_path/../Frameworks/libfreetype.6.dylib \
106 Factor.app/Contents/MacOS/Factor
110 rm -rf $(DISK_IMAGE_DIR)
111 mkdir $(DISK_IMAGE_DIR)
112 mkdir -p $(DISK_IMAGE_DIR)/Factor/
113 cp -R $(BUNDLE) $(DISK_IMAGE_DIR)/Factor/$(BUNDLE)
115 cp factor.image license.txt README.txt TODO.FACTOR.txt \
116 $(DISK_IMAGE_DIR)/Factor/
117 find doc library contrib examples fonts \( -name '*.factor' \
129 -exec ./cp_dir {} $(DISK_IMAGE_DIR)/Factor/{} \;
130 hdiutil create -srcfolder "$(DISK_IMAGE_DIR)" -fs HFS+ \
131 -volname "$(DISK_IMAGE_DIR)" "$(DISK_IMAGE)"
134 ctags-exuberant vm/*.[chm]
137 $(CC) $(LIBS) $(LIBPATH) $(CFLAGS) -o $@$(PLAF_SUFFIX) $(OBJS)
143 rm -rf $(BUNDLE)/Contents/Resources/
144 rm -f $(BUNDLE)/Contents/MacOS/Factor
147 $(CC) -c $(CFLAGS) -o $@ $<
150 $(CC) -c $(CFLAGS) -o $@ $<
153 $(CC) -c $(CFLAGS) -o $@ $<