File: rules

package info (click to toggle)
aboot 1.0~pre20200212-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 908 kB
  • sloc: ansic: 8,793; perl: 738; asm: 308; makefile: 270; sh: 3
file content (76 lines) | stat: -rwxr-xr-x 2,566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f

DEB_HOST_GNU_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

export DEB_CPPFLAGS_MAINT_APPEND = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
export DEB_CFLAGS_MAINT_APPEND = -Wall

CC ?= gcc
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
	CC = $(DEB_HOST_GNU_TYPE)-$(CC)
endif

ifeq (alpha,$(DEB_HOST_GNU_CPU))
	export DH_OPTIONS=-Naboot-cross
else
	export DH_OPTIONS=-paboot-cross
endif

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
      LDFLAGS += +s
#     TESTING = "TESTING=yes"
      CPPFLAGS += "-O0"
endif

%:
	dh $@

override_dh_auto_build:
ifeq (alpha,$(DEB_HOST_GNU_CPU))
	$(MAKE) $(TESTING) all netabootwrap CC=$(CC) $(shell dpkg-buildflags --export=configure)
	$(MAKE) -C doc/man all
	$(MAKE) -C doc/man/de all
	$(MAKE) -C srmbootfat all CC=$(CC) $(shell dpkg-buildflags --export=configure)
ifneq (,$(filter aboot-base, $(shell dh_listpackages)))
	$(MAKE) $(TESTING) bootlx net_aboot.nh net_pad CC=$(CC) $(shell dpkg-buildflags --export=configure)
	$(MAKE) -C doc/faq
endif
else
	$(MAKE) -C tools $(TESTING) isomarkboot CC=$(CC) $(shell dpkg-buildflags --export=configure)
	$(MAKE) -C srmbootfat srmbootfat srmbootfat.1 CC=$(CC) $(shell dpkg-buildflags --export=configure)
	$(MAKE) -C doc/man
	$(MAKE) -C doc/man/de
	rename 's/([a-z]*).([1,5,8])/\1.de.\2/' doc/man/de/*.[1,5,8]
endif

override_dh_auto_clean:
	$(MAKE) distclean
	$(MAKE) -C doc/man clean
	$(MAKE) -C doc/man/de clean
	$(MAKE) -C doc/faq clean
	$(MAKE) -C srmbootfat clean

override_dh_auto_install:
ifeq (alpha,$(DEB_HOST_GNU_CPU))
ifneq (,$(filter aboot, $(shell dh_listpackages)))
	$(MAKE) root=`pwd`/debian/aboot install
	install -m 644 aboot.conf debian/aboot/usr/share/aboot/aboot.conf
	mv debian/aboot/sbin/isomarkboot debian/aboot/usr/bin/
	install -m 755 sdisklabel/sdisklabel debian/aboot/sbin/sdisklabel
	install -m 755 srmbootfat/srmbootraw debian/aboot/sbin/srmbootraw
	install -m 755 srmbootfat/srmbootfat debian/aboot/usr/bin/
	install -m 755 netabootwrap debian/aboot/usr/bin/
	rm -rf debian/aboot/boot
	rm -rf debian/aboot/usr/share/man/man1
endif
else
	install -m 755 tools/isomarkboot debian/aboot-cross/usr/bin
	install -m 755 srmbootfat/srmbootfat debian/aboot-cross/usr/bin
endif
ifneq (,$(filter aboot-base, $(shell dh_listpackages)))
	install -m 644 bootlx debian/aboot-base/boot/bootlx
	install -m 644 net_aboot.nh debian/aboot-base/boot/
	install -m 644 net_pad debian/aboot-base/boot/
endif