Updated the Debian build system thanks to Ian Jackson for the

help.
This commit is contained in:
Gordon Henderson
2015-09-20 19:30:38 +01:00
parent a776e6b0e8
commit 170dce5f19
8 changed files with 132 additions and 47 deletions

View File

@@ -49,7 +49,7 @@ OBJ = $(SRC:.c=.o)
all: gpio
version.h: ../VERSION
./newVersion
$Q echo Need to run newVersion above.
gpio: $(OBJ)
$Q echo [Link]
@@ -97,3 +97,5 @@ depend:
makedepend -Y $(SRC)
# DO NOT DELETE
gpio.o: version.h

View File

@@ -1194,6 +1194,17 @@ int main (int argc, char *argv [])
printf ("Raspberry Pi Details:\n") ;
printf (" Type: %s, Revision: %s, Memory: %dMB, Maker: %s %s\n",
piModelNames [model], piRevisionNames [rev], mem, piMakerNames [maker], overVolted ? "[OV]" : "") ;
// Quick check for /dev/gpiomem
if ((i = open ("/dev/gpiomem", O_RDWR | O_SYNC | O_CLOEXEC) ) >= 0)
printf (" This Raspberry Pi supports user-level GPIO access via /dev/gpiomem.\n") ;
else
{
printf (" You need to run your programs as root for GPIO access\n") ;
printf (" (Old /dev/mem method - consider upgrading)\n") ;
}
}
return 0 ;
}

View File

@@ -1,26 +0,0 @@
#!/bin/sh -e
#
# newVersion:
# Utility to create the version.h include file for the gpio command.
#
# Copyright (c) 2012-2015 Gordon Henderson
#################################################################################
# This file is part of wiringPi:
# Wiring Compatable library for the Raspberry Pi
#
# wiringPi is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# wiringPi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
#################################################################################
rm -f version.h
echo "#define VERSION \"`cat ../VERSION`\"" > version.h

View File

@@ -1 +1 @@
#define VERSION "2.26"
#define VERSION "2.27"