2006-01-18 14:06:34 -05:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
# SITE_CFLAGS=-fPIC -ffast-math -funsigned-char -mpowerpc -mpowerpc-gpopt -mpowerpc-gfxopt -maltivec -mabi=altivec -mtune=G4 -mcpu=G4 -pipe
|
|
|
|
# SITE_CFLAGS=-march=pentium4
|
|
|
|
|
2006-01-19 15:14:36 -05:00
|
|
|
VERSION=0.80
|
|
|
|
FARCH=$(shell sh debian/architecture.sh)
|
|
|
|
|
2006-01-18 14:06:34 -05:00
|
|
|
configure: configure-stamp
|
|
|
|
|
|
|
|
configure-stamp:
|
|
|
|
dh_testdir
|
|
|
|
touch configure-stamp
|
|
|
|
|
|
|
|
build: build-stamp
|
|
|
|
|
|
|
|
build-stamp: configure-stamp
|
|
|
|
dh_testdir
|
2006-01-31 05:10:24 -05:00
|
|
|
# Build the bootstrap image
|
2006-01-19 15:14:36 -05:00
|
|
|
$(MAKE) linux-$(FARCH)
|
|
|
|
mv f runtime
|
2006-01-31 05:10:24 -05:00
|
|
|
echo 'USE: image "$(FARCH)" make-image' | ./runtime /usr/lib/factor/basic.image # || wget http://factorcode.org/boot.image.$(FARCH)
|
2006-01-19 15:14:36 -05:00
|
|
|
mv boot.image.$(FARCH) boot.image
|
|
|
|
# Build the factor image
|
|
|
|
./runtime boot.image -libraries:sdl:name=libSDL.so -libraries:freetype:name=libfreetype.so
|
|
|
|
mv factor.image basic.image
|
|
|
|
# Build the extended image
|
2006-01-18 14:06:34 -05:00
|
|
|
sqlite3 contrib/sqlite/test.db < contrib/sqlite/test.txt
|
2006-01-19 20:27:38 -05:00
|
|
|
echo 'USING: image kernel ; "contrib/load.factor" run-file compile-all "extended.image" save-image 0 exit' | ./runtime basic.image +X8
|
2006-01-18 14:06:34 -05:00
|
|
|
touch build-stamp
|
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
rm -f build-stamp configure-stamp
|
|
|
|
-$(MAKE) clean
|
2006-01-19 15:14:36 -05:00
|
|
|
-rm -f f runtime factor.image boot.image boot.image.$(FARCH) basic.image extended.image
|
2006-01-18 14:06:34 -05:00
|
|
|
dh_clean
|
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
2006-01-19 15:14:36 -05:00
|
|
|
# Install binary files
|
2006-01-19 20:27:38 -05:00
|
|
|
install -m 755 -o root -g root runtime $(CURDIR)/debian/factor/usr/lib/factor
|
|
|
|
install -m 644 -o root -g root boot.image basic.image extended.image $(CURDIR)/debian/factor/usr/lib/factor
|
2006-01-19 15:14:36 -05:00
|
|
|
# Install source files
|
2006-01-19 20:27:38 -05:00
|
|
|
cp -r contrib examples fonts library version.factor $(CURDIR)/debian/factor/usr/share/factor
|
|
|
|
find $(CURDIR)/debian/factor/usr/share/factor -type d -exec chmod 755 {} \;
|
|
|
|
find $(CURDIR)/debian/factor/usr/share/factor -type f -exec chmod 644 {} \;
|
|
|
|
chown -R root.root $(CURDIR)/debian/factor/usr/share/factor
|
2006-01-19 15:14:36 -05:00
|
|
|
# Install wrapper scripts
|
2006-01-19 20:27:38 -05:00
|
|
|
install -m 755 -o root -g root debian/scripts/factor-* $(CURDIR)/debian/factor/usr/bin
|
2006-01-18 14:06:34 -05:00
|
|
|
|
|
|
|
binary-indep: build install
|
|
|
|
|
|
|
|
binary-arch: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installchangelogs CHANGES.html
|
|
|
|
dh_installdocs
|
|
|
|
dh_installexamples
|
|
|
|
dh_installman
|
|
|
|
dh_link
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install configure
|