File: rules

package info (click to toggle)
ntldd 0.2-3
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 200 kB
  • sloc: ansic: 1,668; makefile: 19; sh: 4
file content (31 lines) | stat: -rwxr-xr-x 838 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
#!/usr/bin/make -f

export DH_VERBOSE=1

# mingw does not yet support relro, bindnow, or stackprotector
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro,-bindnow,-stackprotector future=+lfs optimize=+lto

export DEB_CFLAGS_MAINT_APPEND=-fno-common -Wall -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x501
export DEB_LDFLAGS_MAINT_APPEND=-limagehlp

export MINGW_AR=/usr/bin/i686-w64-mingw32-ar
export MINGW_CC=/usr/bin/i686-w64-mingw32-gcc

%:
	dh $@

override_dh_auto_build-indep:
	# ar information
	$(MINGW_AR) --version
	@echo
	# compiler information
	$(MINGW_CC) --version
	# build ntldd.exe
	$(MINGW_CC) $(CFLAGS) -c ntldd.c -o ntldd.o
	$(MINGW_CC) $(CFLAGS) -c libntldd.c -o libntldd.o
	$(MINGW_AR) rs libntldd.a libntldd.o
	$(MINGW_CC) ntldd.o libntldd.a $(LDFLAGS) -o ntldd.exe

override_dh_clean:
	dh_clean
	rm -f *.o *.a *.exe