6 pkg-p4 := ctsim-pentium4
7 pkg-athlon := ctsim-athlon
11 ctsim-shared := usr/share/ctsim
13 prefix := debian/$(pkg)
14 prefix-p4 := debian/$(pkg-p4)
15 prefix-athlon := debian/$(pkg-athlon)
16 prefix-help := debian/$(pkg-help)
17 prefix-doc := debian/$(pkg-doc)
19 DESTDIR := `pwd`/$(prefix)
20 DESTDIR-P4 := `pwd`/$(prefix-p4)
21 DESTDIR-ATHLON := `pwd`/$(prefix-athlon)
22 HELPDIR := `pwd`/$(prefix-help)/$(ctsim-shared)
23 doc-dir := usr/share/doc/$(pkg-doc)
24 pixmap-dir := usr/X11R6/include/X11/pixmaps
26 configure: configure-stamp
29 # Add here commands to configure the package.
33 build-arch: configure-stamp build-arch-stamp
36 # Add here commands to compile the package.
37 dh_installdirs -p $(pkg-help) $(ctsim-shared)
38 ./configure --prefix=$(DESTDIR)/usr --mandir=$(DESTDIR)/usr/share/man --datadir=$(HELPDIR) --with-ctn
42 ./configure --prefix=$(DESTDIR-P4)/usr --mandir=$(DESTDIR-P4)/usr/share/man --datadir=$(HELPDIR) --with-ctn --mcpu=pentium4
46 ./configure --prefix=$(DESTDIR-P4)/usr --mandir=$(DESTDIR-P4)/usr/share/man --datadir=$(HELPDIR) --with-ctn --mcpu=athlon
49 touch build-arch-stamp
51 build-indep: configure-stamp build-indep-stamp
54 # Add here command to compile/build the arch indep package.
55 # It's ok not to do anything here, if you don't need to build
56 # anything for this package.
57 #/usr/bin/docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
58 (cd docs; tar xzf html.tar.gz)
59 touch build-indep-stamp
61 build: build-arch build-indep
66 rm -f build-arch-stamp build-indep-stamp configure-stamp
67 # Add here commands to clean up after the build process.
69 find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
70 rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
79 # Add here commands to install the package into debian/ctsim.
80 dh_installdirs -p $(pkg-help) $(pixmap-dir)
81 dh_install -p $(pkg-help) debian/ctsim.xpm $(pixmap-dir)
82 dh_install -p $(pkg-help) docs/ctsim.htb $(ctsim-shared)
83 dh_install -p $(pkg-doc) docs/html $(doc-dir)
84 dh_link -p $(pkg-doc) $(doc-dir)/html/$(pkg)_contents.html $(doc-dir)/html/index.html
85 gzip -9 docs/ctsim.pdf
86 dh_install -p $(pkg-doc) docs/ctsim.pdf.gz $(doc-dir)
87 gunzip docs/ctsim.pdf.gz
88 chmod +x helical/*.sh tools/*.sh
90 # Build architecture-independent files here.
91 # Pass -i to all debhelper commands in this target to reduce clutter.
92 binary-indep: build install
95 # dh_installdebconf -i
99 # dh_installlogrotate -i
100 # dh_installemacsen -i
108 dh_installchangelogs ChangeLog -i
118 # Build architecture-dependent files here.
119 binary-arch: build install
122 # dh_installdebconf -a
124 dh_installexamples -a tools/sample-ctsim.sh helical/sample-helical.sh
126 # dh_installlogrotate -a
127 # dh_installemacsen -a
135 dh_installchangelogs ChangeLog -a
148 binary: binary-indep binary-arch
150 .PHONY: build clean binary-indep binary-arch binary install configure