6 pkg-p4 := ctsim-pentium4
7 pkg-athlon := ctsim-athlon
11 prefix := debian/$(pkg)
12 prefix-p4 := debian/$(pkg-p4)
13 prefix-athlon := debian/$(pkg-athlon)
14 prefix-help := debian/$(pkg-help)
15 prefix-doc := debian/$(pkg-doc)
17 DESTDIR := `pwd`/$(prefix)
18 DESTDIR-P4 := `pwd`/$(prefix-p4)
19 DESTDIR-ATHLON := `pwd`/$(prefix-athlon)
20 HELPDIR := `pwd`/$(prefix-help)/usr/share/ctsim
21 doc-dir := usr/share/doc/$(pkg-doc)
22 pixmap-dir := usr/X11R6/include/X11/pixmaps
24 configure: configure-stamp
27 # Add here commands to configure the package.
31 build-arch: configure-stamp build-arch-stamp
34 # Add here commands to compile the package.
35 ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR) --with-ctn
39 ./configure --prefix=$(DESTDIR-P4)/usr --mandir=$(DESTDIR-P4)/usr/share/man --datadir=$(HELPDIR) --with-ctn --mcpu=pentium4
43 ./configure --prefix=$(DESTDIR-P4)/usr --mandir=$(DESTDIR-P4)/usr/share/man --datadir=$(HELPDIR) --with-ctn --mcpu=athlon
46 touch build-arch-stamp
48 build-indep: configure-stamp build-indep-stamp
51 # Add here command to compile/build the arch indep package.
52 # It's ok not to do anything here, if you don't need to build
53 # anything for this package.
54 #/usr/bin/docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
55 (cd docs; tar xzf html.tar.gz)
56 touch build-indep-stamp
58 build: build-arch build-indep
63 rm -f build-arch-stamp build-indep-stamp configure-stamp
64 # Add here commands to clean up after the build process.
66 find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
67 rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
76 # Add here commands to install the package into debian/ctsim.
77 dh_installdirs -p $(pkg-help) $(pixmap-dir)
78 dh_install -p $(pkg-help) debian/ctsim.xpm $(pixmap-dir)
79 dh_install -p $(pkg-doc) docs/html $(doc-dir)
80 dh_link -p $(pkg-doc) $(doc-dir)/html/$(pkg)_contents.html $(doc-dir)/html/index.html
81 gzip -9 docs/ctsim.pdf
82 dh_install -p $(pkg-doc) docs/ctsim.pdf.gz $(doc-dir)
83 gunzip docs/ctsim.pdf.gz
84 chmod +x helical/*.sh tools/*.sh
86 # Build architecture-independent files here.
87 # Pass -i to all debhelper commands in this target to reduce clutter.
88 binary-indep: build install
91 # dh_installdebconf -i
95 # dh_installlogrotate -i
96 # dh_installemacsen -i
104 dh_installchangelogs ChangeLog -i
114 # Build architecture-dependent files here.
115 binary-arch: build install
118 # dh_installdebconf -a
120 dh_installexamples -a tools/sample-ctsim.sh helical/sample-helical.sh
122 # dh_installlogrotate -a
123 # dh_installemacsen -a
131 dh_installchangelogs ChangeLog -a
144 binary: binary-indep binary-arch
146 .PHONY: build clean binary-indep binary-arch binary install configure