Getting version information now out of the backends main file.

merge-requests/1/head
Gerhard Jaeger 2004-07-16 11:32:04 +00:00
rodzic 472a85788d
commit 2c42298a29
3 zmienionych plików z 18 dodań i 16 usunięć

Wyświetl plik

@ -34,7 +34,7 @@ fi
echo -e "\b\b\b - done."
#
#
# Version checks...
#
echo -e "\nCheck for kernelversion:"
if [ "$OSMINOR" == "6" ]; then
@ -48,6 +48,9 @@ else
exit -2
fi
#
# Setup...
#
echo -e "Build-directory: \n"$BUILD_DIR
echo -n "Removing build-directory..."
rm -rf $BUILD_DIR
@ -62,7 +65,7 @@ echo -n "Linking source files..."
C_FILES=`ls $SRC_DIR/plustek-pp_*.c`
H_FILES=`ls $SRC_DIR/plustek-pp_*.h`
for F in $C_FILES $H_FILES $SRC_DIR/plustek-pp.h; do
for F in $C_FILES $H_FILES $SRC_DIR/plustek-pp.h $SRC_DIR/plustek_pp.c; do
ln -s $F .
done
echo -e "\b\b\b - done."
@ -71,14 +74,21 @@ echo -n "Copying Makefile to build-directory..."
cp $MAKEFILE Makefile
echo -e "\b\b\b - done."
#
# Building the module...
#
echo "Making the module..."
if [ "$OSMINOR" == "4" ]; then
make all $1
else
make -C /lib/modules/$KERNEL_V/build/ SUBDIRS=$BUILD_DIR modules $1
fi
RES=$?
cd ..
if [ $RES != 0 ]; then
echo "There were some build errors..."
exit -1
fi
echo "done."
echo "Should I install the module?"

Wyświetl plik

@ -28,8 +28,7 @@ REF = cxref
#
# common compiler options
#
OPT = -fomit-frame-pointer -D_PTDRV_V1=$(VERSION1) \
-D_PTDRV_V0=$(VERSION0) -D_PTDRV_BUILD=$(BUILD)
OPT = -fomit-frame-pointer -D_PTDRV_VERSTR=\"$(VERSIONSTR)\"
#
# cxref options
@ -52,9 +51,8 @@ REFOPT = -xref-all -index-all -html32
ifeq ($(LINUXVERSION),)
LINUXVERSION = $(shell uname -r)
endif
VERSION0 = $(shell cat ./../VERSION0)
VERSION1 = $(shell cat ./../VERSION1)
BUILD = $(shell cat ./../BUILD)
VERSIONSTR = $(shell grep "define BACKEND_VERSION" $(SRC_DIR)/plustek_pp.c | cut -b25-50 )
# Change it here or specify it on the "make" commandline
ifeq ($(HEADER_PATH),)

Wyświetl plik

@ -10,23 +10,17 @@ ifeq ($(LINUXVERSION),)
endif
LINUXRELEASE = $(shell uname -r | cut -d'.' -f3)
VERSION0 = $(shell cat $(SUBDIRS)/../VERSION0)
VERSION1 = $(shell cat $(SUBDIRS)/../VERSION1)
BUILD = $(shell cat $(SUBDIRS)/../BUILD)
VERSIONSTR = $(shell grep "define BACKEND_VERSION" $(PWD)/plustek_pp.c | cut -b25-50 )
#
# extra flags
#
EXTRA_CFLAGS += -D_PTDRV_V1=$(VERSION1) -D_PTDRV_V0=$(VERSION0) -D_PTDRV_BUILD=$(BUILD)
EXTRA_CFLAGS += -D_PTDRV_VERSTR=\"$(VERSIONSTR)\"
ifeq ($(DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
endif
ifeq ($(shell test `uname -r | cut -d'.' -f3` -lt 6 && echo 1),1)
EXTRA_CFLAGS += -mhard-float
endif
#
# the module name
#