factor/debian/rules

79 lines
2.2 KiB
Plaintext
Raw Normal View History

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-19 15:14:36 -05:00
$(MAKE) linux-$(FARCH)
mv f runtime
# Build the bootstrap image
echo "USE: image \"$(FARCH)\" make-image" | factor-run --basic debian/make-bootstrap-images.factor # || wget http://factorcode.org/boot.image.$(FARCH)
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 15:14:36 -05:00
$(CC) $(CFLAGS) -L /usr/X11R6/lib -shared -o contrib/factory/simple-error-handler.so contrib/factory/simple-error-handler.c -lX11
echo 'USING: image kernel ; "extended.image" save-image 0 exit' | ./runtime basic.image contrib/load.factor
# Build the documentation
2006-01-18 14:06:34 -05:00
cd doc && for i in *.eps; do epstopdf $$i; done
cd doc && rubber --pdf theory
cd doc && sh makedoc
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
install runtime boot.image basic.image extended.image $(CURDIR)/debian/factor/usr/lib/factor
# Install source files
install contrib examples fonts library version.factor $(CURDIR)/debian/factor/usr/share/factor
# Install wrapper scripts
install -m 755 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