source: trunk/debian/package/hostapd/debian/rules @ 321

Last change on this file since 321 was 321, checked in by amain, 8 years ago

hostapd: fix unexported CFLAGS

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/usr/bin/make -f
2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4# This file was originally written by Joey Hess and Craig Small.
5# As a special exception, when this file is copied by dh-make into a
6# dh-make output file, you may use that output file without restriction.
7# This special exception was added by Craig Small in version 0.37 of dh-make.
8
9# Uncomment this to turn on verbose mode.
10#export DH_VERBOSE=1
11
12# These are used for cross-compiling and for saving the configure script
13# from having to guess our platform (since we know it already)
14DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
15DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
17CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
18else
19CROSS= --build $(DEB_BUILD_GNU_TYPE)
20endif
21
22CC=$(DEB_HOST_GNU_TYPE)-gcc
23export CC
24
25# CFLAGS as suggested by hostapd Makefile
26CFLAGS = -MMD -O2 -Wall -g
27CFLAGS += -I../src
28CFLAGS += -I../src/utils
29
30# support madwifi
31CFLAGS += -I../../src/madwifi
32
33# Make sure DebWrt linux kernel headers are used ( emdebian contains somewhat older headers files )
34CFLAGS+=-I/usr/$(DEB_HOST_GNU_TYPE)/src/linux/include
35export CFLAGS
36
37%:
38        dh $@ 
39
40build:
41        dh_testdir
42        dh_auto_configure
43
44        $(MAKE) -C src/hostapd
45
46        dh_auto_test
47
48override_dh_auto_install:
49        install -d debian/hostapd/usr/sbin
50        install -d debian/hostapd/etc/init.d
51        install -d debian/hostapd/etc/hostapd
52        install -d debian/hostapd/etc/default
53        install -o root -g root -m 755 src/hostapd/hostapd debian/hostapd/usr/sbin/hostapd
54        install -o root -g root -m 755 src/hostapd/hostapd_cli debian/hostapd/usr/sbin/hostapd_cli
55        install -o root -g root -m 644 debian/hostapd-nokey.conf debian/hostapd/etc/hostapd/hostapd-nokey.conf
56        install -o root -g root -m 644 debian/hostapd-wpa.conf debian/hostapd/etc/hostapd/hostapd-wpa.conf
57        install -o root -g root -m 644 debian/hostapd-wep.conf debian/hostapd/etc/hostapd/hostapd-wep.conf
58        install -o root -g root -m 644 debian/hostapd.default debian/hostapd/etc/default/hostapd
59        install -o root -g root -m 755 debian/hostapd.init debian/hostapd/etc/init.d/hostapd
60
61override_dh_installinit:
62        # do nothing, we want hostapd not to be started at system boot time, but from /etc/network/interfaces on demand
63
64override_dh_auto_clean:
65        echo DEBUG ticket116 $(MAKE) -C src/hostapd clean
66
Note: See TracBrowser for help on using the repository browser.