...
 
Commits (1)
......@@ -9,15 +9,18 @@ Author: Tomasz Buchert <tomasz@debian.org>
Forwarded: not-needed
Last-Update: 2014-01-05
Reviewed-By: Sebastien Badia <seb@sebian.fr>
Conflicts:
Makefile
---
Makefile | 48 +++++++++++++++++++++++++++++-------------------
1 file changed, 29 insertions(+), 19 deletions(-)
Makefile | 52 ++++++++++++++++++++++++++++++----------------------
1 file changed, 30 insertions(+), 22 deletions(-)
diff --git a/Makefile b/Makefile
index 1855f10..833ce4a 100644
index 1ac2912..b63aef4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,28 @@
@@ -1,24 +1,28 @@
+DPKG_EXPORT_BUILDFLAGS=1
+include /usr/share/dpkg/buildflags.mk
+
......@@ -31,9 +34,14 @@ index 1855f10..833ce4a 100644
-GIT2LOG := $(shell if [ -x ./git2log ] ; then echo ./git2log --update ; else echo true ; fi)
-GITDEPS := $(shell [ -d .git ] && echo .git/HEAD .git/refs/heads .git/refs/tags)
-VERSION := $(shell $(GIT2LOG) --version VERSION ; cat VERSION)
-BRANCH := $(shell [ -d .git ] && git branch | perl -ne 'print $$_ if s/^\*\s*//')
-PREFIX := libx86emu-$(VERSION)
+CC ?= gcc
+CFLAGS += -g -O2 -fPIC -fomit-frame-pointer -Wall
-MAJOR_VERSION := $(shell $(GIT2LOG) --version VERSION ; cut -d . -f 1 VERSION)
-
-CC = gcc
-CFLAGS = -g -O2 -fPIC -fomit-frame-pointer -Wall
-ifneq ($(filter x86_64, $(ARCH)),)
......@@ -48,16 +56,14 @@ index 1855f10..833ce4a 100644
+ endif
endif
-LIBX86 = libx86emu
-VERSION := $(shell $(GIT2LOG) --version VERSION ; cat VERSION)
-MAJOR_VERSION := $(shell $(GIT2LOG) --version VERSION ; cut -d . -f 1 VERSION)
+
+LIBX86 := libx86emu
+VERSION := $(shell cat VERSION)
+MAJOR_VERSION := $(shell cut -d . -f 1 VERSION)
CFILES = $(wildcard *.c)
OBJS = $(CFILES:.c=.o)
@@ -24,15 +30,12 @@ OBJS = $(CFILES:.c=.o)
@@ -26,15 +30,12 @@ OBJS = $(CFILES:.c=.o)
LIB_NAME = $(LIBX86).so.$(VERSION)
LIB_SONAME = $(LIBX86).so.$(MAJOR_VERSION)
......@@ -66,17 +72,17 @@ index 1855f10..833ce4a 100644
%.o: %.c
- $(CC) -c $(CFLAGS) $<
-
-all: changelog shared
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $<
-all: changelog shared
-
-changelog: $(GITDEPS)
- $(GIT2LOG) --changelog changelog
+all: shared
shared: $(LIB_NAME)
@@ -43,7 +46,7 @@ install: shared
@@ -45,7 +46,7 @@ install: shared
install -m 644 -D include/x86emu.h $(DESTDIR)/usr/include/x86emu.h
$(LIB_NAME): .depend $(OBJS)
......@@ -85,9 +91,9 @@ index 1855f10..833ce4a 100644
test:
make -C test
@@ -52,9 +55,16 @@ clean:
make -C test clean
@@ -62,9 +63,16 @@ clean:
rm -f *.o *~ include/*~ *.so.* .depend
rm -rf package
+release:
+ rm -f VERSION CHANGELOG
......