File: rules

package info (click to toggle)
lzma 24.08%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,472 kB
  • sloc: cpp: 78,089; ansic: 26,903; asm: 4,195; cs: 3,846; java: 3,077; makefile: 1,010; sh: 74
file content (33 lines) | stat: -rwxr-xr-x 1,366 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_BUILD_OPTIONS += notrimdch
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/buildflags.mk

SRC_DIR_C = C/Util/Lzma
SRC_DIR_CPP = CPP/7zip/Bundles/LzmaCon

# This has to be exported to make some magic below work.
export DH_OPTIONS
export O = .
export FILE_IO = FileIO
export FILE_IO_2 = Windows/FileIO

override_dh_auto_build:
	dh_auto_build -- all -C $(SRC_DIR_C)   -f makefile.gcc LOCAL_FLAGS="$(CXXFLAGS) $(CPPFLAGS)"      MY_LIBS="$(LDFLAGS)" LFLAGS_STRIP=
	dh_auto_build -- all -C $(SRC_DIR_CPP) -f makefile.gcc LOCAL_FLAGS_SYS="$(CXXFLAGS) $(CPPFLAGS)"  MY_LIBS="$(LDFLAGS)" LFLAGS_STRIP=
	mv $(SRC_DIR_CPP)/lzma $(SRC_DIR_CPP)/lzma_alone
	ln debian/lzmp.cpp $(SRC_DIR_CPP)
	sed -e '1s/lzma/lzmp/' -e 's/LzmaAlone\.o/lzmp.o/' < $(SRC_DIR_CPP)/makefile.gcc > $(SRC_DIR_CPP)/makefile.lzmp
	dh_auto_build -- all -C $(SRC_DIR_CPP) -f makefile.lzmp LOCAL_FLAGS_SYS="$(CXXFLAGS) $(CPPFLAGS)" MY_LIBS="$(LDFLAGS)" LFLAGS_STRIP=

override_dh_auto_clean:
	$(MAKE) clean -C $(SRC_DIR_C) -f makefile.gcc
	$(MAKE) clean -C $(SRC_DIR_CPP) -f makefile.gcc
	! [ -f $(SRC_DIR_CPP)/makefile.lzmp ] || $(MAKE) clean -C $(SRC_DIR_CPP) -f makefile.lzmp
	rm -f $(SRC_DIR_C)/*.o $(SRC_DIR_C)/*.a \
		$(SRC_DIR_CPP)/*.o $(SRC_DIR_CPP)/*.a \
		$(SRC_DIR_CPP)/lzmp.cpp $(SRC_DIR_CPP)/makefile.lzmp

%:
	dh $@ --buildsystem=makefile