More changes to help reflect usage on Rev 2 / 512MB Raspberry Pi's.
Also Makefile tweaks to help improve things somewhat - decided to read the Makefile manual after some 15 years to updated my make grey cells somewhat. New command in the gpio command - readall
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
#DEBUG = -g -O0
|
||||
DEBUG = -O3
|
||||
DEBUG = -O2
|
||||
CC = gcc
|
||||
INCLUDE = -I/usr/local/include
|
||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
@@ -32,45 +32,49 @@ CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
LDFLAGS = -L/usr/local/lib
|
||||
LIBS = -lwiringPi
|
||||
|
||||
# Should not alter anything below this line
|
||||
# May not need to alter anything below this line
|
||||
###############################################################################
|
||||
|
||||
SRC = gpio.c
|
||||
|
||||
OBJ = gpio.o
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
all: gpio
|
||||
|
||||
gpio: gpio.o /usr/local/lib/libwiringPi.a /usr/local/lib/libwiringPi.so.1.0
|
||||
@echo [LD]
|
||||
gpio: gpio.o
|
||||
@echo [Link]
|
||||
@$(CC) -o $@ gpio.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
.c.o:
|
||||
@echo [CC] $<
|
||||
@echo [Compile] $<
|
||||
@$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
.PHONEY: clean
|
||||
clean:
|
||||
rm -f $(OBJ) gpio *~ core tags
|
||||
rm -f $(OBJ) gpio *~ core tags *.bak
|
||||
|
||||
.PHONEY: tags
|
||||
tags: $(SRC)
|
||||
@echo [ctags]
|
||||
@ctags $(SRC)
|
||||
|
||||
depend:
|
||||
makedepend -Y $(SRC)
|
||||
|
||||
.PHONEY: install
|
||||
install:
|
||||
@echo -n "Installing... "
|
||||
@echo "[Install]"
|
||||
@cp gpio /usr/local/bin
|
||||
@chown root.root /usr/local/bin/gpio
|
||||
@chmod 4755 /usr/local/bin/gpio
|
||||
@mkdir -p /usr/local/man/man1
|
||||
@cp gpio.1 /usr/local/man/man1
|
||||
@echo "Done."
|
||||
|
||||
|
||||
.PHONEY: uninstall
|
||||
uninstall:
|
||||
@echo "[UnInstall]"
|
||||
rm -f /usr/local/bin/gpio
|
||||
rm -f /usr/local/man/man1/gpio.1
|
||||
|
||||
.PHONEY: depend
|
||||
depend:
|
||||
makedepend -Y $(SRC)
|
||||
|
||||
# DO NOT DELETE
|
||||
|
||||
Reference in New Issue
Block a user