File: rules

package info (click to toggle)
micro-httpd 20051212-15
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 160 kB
  • ctags: 121
  • sloc: ansic: 695; sh: 165; makefile: 98
file content (38 lines) | stat: -rwxr-xr-x 854 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
#!/usr/bin/make -f

PACKAGE = micro-httpd
BIN	= micro_httpd

include debian/debian-vars.mk

export DEB_BUILD_MAINT_OPTIONS	= hardening=+all
export DEB_CFLAGS_MAINT_APPEND	= -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

man:
	# target: man -- convert *.pod to manual page
	$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \
	MANSECT=8 makeman

override_dh_auto_build: man
	# Notify Makefile about compilation. We skip the *.o step.
	touch micro_httpd.o
	$(CC) $(CFLAGS) $(CPPFLAGS) micro_httpd.c $(LDFLAGS) -o $(BIN)

override_dh_auto_install:
	install -d -m 0755 $(SBINDIR) $(MAN8DIR)
	$(MAKE) install BINDIR=$(SBINDIR) MANDIR=$(MAN8DIR)

	# rename binary
	mv $(SBINDIR)/$(BIN) $(SBINDIR)/$(PACKAGE)

	# replace original manual page
	rm -f $(MAN8DIR)/*
	$(INSTALL_DATA) debian/*.8 $(MAN8DIR)

%:
	dh $@

.PHONY: man

# End of file