File: rules

package info (click to toggle)
ocamlsdl 0.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,608 kB
  • sloc: ansic: 3,311; sh: 3,103; ml: 2,111; makefile: 180; awk: 13
file content (42 lines) | stat: -rwxr-xr-x 1,283 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/ocaml/ocamlvars.mk

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

DESTDIR=$(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)
OCAMLSDL=$(CURDIR)/debian/libsdl-ocaml
OCAMLSDLDEV=$(OCAMLSDL)-dev

%:
	dh $@ --with ocaml

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	[ ! -f makefile.config.gcc ] || $(MAKE) clean
	rm -f config.log config.status
	rm -f makefile.config.gcc src/config.h

.PHONY: override_dh_auto_install
override_dh_auto_install:
	mkdir -p $(DESTDIR)
	$(MAKE) install OCAMLFIND_DESTDIR=$(DESTDIR) OCAMLFIND_LDCONF=ignore

.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
	dh_installchangelogs NEWS