CC = gcc
LD = gcc
-CFLAGS = -O2 -g -fPIC -Wall
-LDFLAGS = -shared
+CFLAGS = -O2 -g -Wall
+LDFLAGS =
+REAL_CFLAGS = $(CFLAGS) -fPIC
+REAL_LDFLAGS = $(LDFLAGS) -shared
LDLIBS = -ldl
INST_BIN = install -c -m755
INST_LIB = install -c -m644
SOURCES = noip.c uopen.c withlib.in
all: $(TARGETS)
%.o: %.c
- $(CC) -c $(CFLAGS) $< -o $@
+ $(CC) -c $(REAL_CFLAGS) $< -o $@
noip.so: $(patsubst %.c, %.o, noip.c)
- $(LD) $(LDFLAGS) $< $(LDLIBS) -o $@
+ $(LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
uopen.so: $(patsubst %.c, %.o, uopen.c)
- $(LD) $(LDFLAGS) $< $(LDLIBS) -o $@
+ $(LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
$(SCRIPTS): withlib.in
for i in $(SCRIPTS); do \
sed "s/@lib@/$$i/" withlib.in >$$i.new || exit 1; \
*.debhelper
noip
uopen
-
+*.log
+compat
+stamp-*
-usr/bin/noip
-usr/lib/noip.so
-usr/share/man/man1/noip.1
+debian/tmp/usr/bin/noip
+debian/tmp/usr/lib/noip.so
+debian/tmp/usr/share/man/man1/noip.1
#! /usr/bin/make -f
-export DH_COMPAT = 4
+CDBS = /usr/share/cdbs/1
-build:
- make clean
- make
- touch build
+include $(CDBS)/rules/debhelper.mk
+include $(CDBS)/class/makefile.mk
-clean:
- dh_clean
- make clean
-
-install: build
- dh_clean
- make install \
- prefix=/usr \
- mandir=/usr/share/man \
- DESTDIR=`pwd`/debian/tmp
- dh_install --sourcedir=debian/tmp
- rm -rf debian/tmp
-
-binary-indep:
-
-binary-arch: install
- dh_testdir -a
- dh_testroot -a
- dh_compress -a
- dh_installdocs -a
- dh_strip -a
- dh_shlibdeps -a
- dh_gencontrol -a
- dh_fixperms -a
- dh_installdeb -a
- dh_md5sums -a
- dh_builddeb -a
-
-binary: binary-indep binary-arch
-
-source:
- rm -rf deb-dist.tar.gz =deb=
- make dist DISTTAR=deb-dist.tar.gz
- mkdir =deb=
- cd =deb=; tar xvfz ../deb-dist.tar.gz
- d=`pwd`; cd ..; dpkg-source -i -i'/\.svn/' -b $$d/=deb=/*
- rm -rf deb-dist.tar.gz =deb=
-
-.PHONY: binary binary-arch binary-indep clean install source
+DEB_MAKE_CLEAN_TARGET = clean
+DEB_MAKE_INSTALL_TARGET = install \
+ prefix=/usr mandir=/usr/share/man \
+ DESTDIR=debian/tmp
-usr/bin/uopen
-usr/lib/uopen.so
-usr/share/man/man1/uopen.1
+debian/tmp/usr/bin/uopen
+debian/tmp/usr/lib/uopen.so
+debian/tmp/usr/share/man/man1/uopen.1