Bläddra i källkod

Build system: Enable V=1 to disable @'s

This patch is autogenerated, with:
  git-ls-files | grep Makefile | xargs perl -i~ -pe 's/^\t\@/\t\$Q /'

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
pull/62/head
Ian Jackson 9 år sedan
förälder
incheckning
da03f9ed2f
9 ändrade filer med 216 tillägg och 216 borttagningar
  1. +33
    -33
      devLib/Makefile
  2. +20
    -20
      examples/Gertboard/Makefile
  3. +55
    -55
      examples/Makefile
  4. +18
    -18
      examples/PiFace/Makefile
  5. +16
    -16
      examples/PiGlow/Makefile
  6. +16
    -16
      examples/q2w/Makefile
  7. +20
    -20
      gpio/Makefile
  8. +5
    -5
      pins/Makefile
  9. +33
    -33
      wiringPi/Makefile

+ 33
- 33
devLib/Makefile Visa fil

@@ -57,66 +57,66 @@ all: $(DYNAMIC)
static: $(STATIC)

$(STATIC): $(OBJ)
@echo "[Link (Static)]"
@ar rcs $(STATIC) $(OBJ)
@ranlib $(STATIC)
$Q echo "[Link (Static)]"
$Q ar rcs $(STATIC) $(OBJ)
$Q ranlib $(STATIC)
# @size $(STATIC)

$(DYNAMIC): $(OBJ)
@echo "[Link (Dynamic)]"
@$(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
$Q echo "[Link (Dynamic)]"
$Q $(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)

.c.o:
@echo [Compile] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [Compile] $<
$Q $(CC) -c $(CFLAGS) $< -o $@

.PHONY: clean
clean:
@echo "[Clean]"
@rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.*
$Q echo "[Clean]"
$Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.*

.PHONY: tags
tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)


.PHONY: install
install: $(DYNAMIC)
@echo "[Install Headers]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/include
@install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
@echo "[Install Dynamic Lib]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
@install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION)
@ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so
@ldconfig
$Q echo "[Install Headers]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
$Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
$Q echo "[Install Dynamic Lib]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
$Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION)
$Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so
$Q ldconfig

.PHONY: install-static
install-static: $(STATIC)
@echo "[Install Headers]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/include
@install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
@echo "[Install Static Lib]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
@install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib
$Q echo "[Install Headers]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
$Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
$Q echo "[Install Static Lib]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
$Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib

.PHONY: install-deb
install-deb: $(DYNAMIC)
@echo "[Install Headers: deb]"
@install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/include
@install -m 0644 $(HEADERS) ~/wiringPi/debian/wiringPi/usr/include
@echo "[Install Dynamic Lib: deb]"
$Q echo "[Install Headers: deb]"
$Q install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/include
$Q install -m 0644 $(HEADERS) ~/wiringPi/debian/wiringPi/usr/include
$Q echo "[Install Dynamic Lib: deb]"
install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/lib
install -m 0755 libwiringPiDev.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPiDev.so.$(VERSION)
ln -sf ~/wiringPi/debian/wiringPi/usr/lib/libwiringPi.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPiDev.so

.PHONY: uninstall
uninstall:
@echo "[UnInstall]"
@cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
@cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.*
@ldconfig
$Q echo "[UnInstall]"
$Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
$Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.*
$Q ldconfig


.PHONY: depend


+ 20
- 20
examples/Gertboard/Makefile Visa fil

@@ -33,44 +33,44 @@ BINS = $(SRC:.c=)
all: $(BINS)

gertboard: gertboard.o
@echo [link]
@$(CC) -o $@ gertboard.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ gertboard.o $(LDFLAGS) $(LDLIBS)

buttons: buttons.o
@echo [link]
@$(CC) -o $@ buttons.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ buttons.o $(LDFLAGS) $(LDLIBS)

7segments: 7segments.o
@echo [link]
@$(CC) -o $@ 7segments.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ 7segments.o $(LDFLAGS) $(LDLIBS)

voltmeter: voltmeter.o
@echo [link]
@$(CC) -o $@ voltmeter.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ voltmeter.o $(LDFLAGS) $(LDLIBS)

temperature: temperature.o
@echo [link]
@$(CC) -o $@ temperature.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ temperature.o $(LDFLAGS) $(LDLIBS)

vumeter: vumeter.o
@echo [link]
@$(CC) -o $@ vumeter.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ vumeter.o $(LDFLAGS) $(LDLIBS)

record: record.o
@echo [link]
@$(CC) -o $@ record.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ record.o $(LDFLAGS) $(LDLIBS)

.c.o:
@echo [CC] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [CC] $<
$Q $(CC) -c $(CFLAGS) $< -o $@

clean:
@echo [Clean]
@rm -f $(OBJ) *~ core tags $(BINS)
$Q echo [Clean]
$Q rm -f $(OBJ) *~ core tags $(BINS)

tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)

depend:
makedepend -Y $(SRC)


+ 55
- 55
examples/Makefile Visa fil

@@ -54,116 +54,116 @@ OBJ = $(SRC:.c=.o)
BINS = $(SRC:.c=)

all:
@cat README.TXT
@echo " $(BINS)" | fmt
@echo ""
$Q cat README.TXT
$Q echo " $(BINS)" | fmt
$Q echo ""

really-all: $(BINS)

blink: blink.o
@echo [link]
@$(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)

blink8: blink8.o
@echo [link]
@$(CC) -o $@ blink8.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ blink8.o $(LDFLAGS) $(LDLIBS)

blink12drcs: blink12drcs.o
@echo [link]
@$(CC) -o $@ blink12drcs.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ blink12drcs.o $(LDFLAGS) $(LDLIBS)

blink12: blink12.o
@echo [link]
@$(CC) -o $@ blink12.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ blink12.o $(LDFLAGS) $(LDLIBS)

speed: speed.o
@echo [link]
@$(CC) -o $@ speed.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ speed.o $(LDFLAGS) $(LDLIBS)

lcd: lcd.o
@echo [link]
@$(CC) -o $@ lcd.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ lcd.o $(LDFLAGS) $(LDLIBS)

lcd-adafruit: lcd-adafruit.o
@echo [link]
@$(CC) -o $@ lcd-adafruit.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ lcd-adafruit.o $(LDFLAGS) $(LDLIBS)

clock: clock.o
@echo [link]
@$(CC) -o $@ clock.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ clock.o $(LDFLAGS) $(LDLIBS)

wfi: wfi.o
@echo [link]
@$(CC) -o $@ wfi.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ wfi.o $(LDFLAGS) $(LDLIBS)

isr: isr.o
@echo [link]
@$(CC) -o $@ isr.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ isr.o $(LDFLAGS) $(LDLIBS)

isr-osc: isr-osc.o
@echo [link]
@$(CC) -o $@ isr-osc.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ isr-osc.o $(LDFLAGS) $(LDLIBS)

nes: nes.o
@echo [link]
@$(CC) -o $@ nes.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ nes.o $(LDFLAGS) $(LDLIBS)

rht03: rht03.o
@echo [link]
@$(CC) -o $@ rht03.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ rht03.o $(LDFLAGS) $(LDLIBS)

pwm: pwm.o
@echo [link]
@$(CC) -o $@ pwm.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ pwm.o $(LDFLAGS) $(LDLIBS)

softPwm: softPwm.o
@echo [link]
@$(CC) -o $@ softPwm.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ softPwm.o $(LDFLAGS) $(LDLIBS)

softTone: softTone.o
@echo [link]
@$(CC) -o $@ softTone.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ softTone.o $(LDFLAGS) $(LDLIBS)

delayTest: delayTest.o
@echo [link]
@$(CC) -o $@ delayTest.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ delayTest.o $(LDFLAGS) $(LDLIBS)

serialRead: serialRead.o
@echo [link]
@$(CC) -o $@ serialRead.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ serialRead.o $(LDFLAGS) $(LDLIBS)

serialTest: serialTest.o
@echo [link]
@$(CC) -o $@ serialTest.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ serialTest.o $(LDFLAGS) $(LDLIBS)

okLed: okLed.o
@echo [link]
@$(CC) -o $@ okLed.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ okLed.o $(LDFLAGS) $(LDLIBS)

tone: tone.o
@echo [link]
@$(CC) -o $@ tone.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ tone.o $(LDFLAGS) $(LDLIBS)

ds1302: ds1302.o
@echo [link]
@$(CC) -o $@ ds1302.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ ds1302.o $(LDFLAGS) $(LDLIBS)

piglow: piglow.o
@echo [link]
@$(CC) -o $@ piglow.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ piglow.o $(LDFLAGS) $(LDLIBS)


.c.o:
@echo [CC] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [CC] $<
$Q $(CC) -c $(CFLAGS) $< -o $@

clean:
@echo "[Clean]"
@rm -f $(OBJ) *~ core tags $(BINS)
$Q echo "[Clean]"
$Q rm -f $(OBJ) *~ core tags $(BINS)

tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)

depend:
makedepend -Y $(SRC)


+ 18
- 18
examples/PiFace/Makefile Visa fil

@@ -47,40 +47,40 @@ BINS = $(SRC:.c=)
all: $(BINS)

blink: blink.o
@echo [link]
@$(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)

buttons: buttons.o
@echo [link]
@$(CC) -o $@ buttons.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ buttons.o $(LDFLAGS) $(LDLIBS)

reaction: reaction.o
@echo [link]
@$(CC) -o $@ reaction.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ reaction.o $(LDFLAGS) $(LDLIBS)

ladder: ladder.o
@echo [link]
@$(CC) -o $@ ladder.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ ladder.o $(LDFLAGS) $(LDLIBS)

metro: metro.o
@echo [link]
@$(CC) -o $@ metro.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ metro.o $(LDFLAGS) $(LDLIBS)

motor: motor.o
@echo [link]
@$(CC) -o $@ motor.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ motor.o $(LDFLAGS) $(LDLIBS)

.c.o:
@echo [CC] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [CC] $<
$Q $(CC) -c $(CFLAGS) $< -o $@

clean:
@echo "[Clean]"
@rm -f $(OBJ) *~ core tags $(BINS)
$Q echo "[Clean]"
$Q rm -f $(OBJ) *~ core tags $(BINS)

tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)

depend:
makedepend -Y $(SRC)


+ 16
- 16
examples/PiGlow/Makefile Visa fil

@@ -47,34 +47,34 @@ BINS = $(SRC:.c=)
all: $(BINS)

piGlow0: piGlow0.o
@echo [link]
@$(CC) -o $@ piGlow0.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ piGlow0.o $(LDFLAGS) $(LDLIBS)

piGlow1: piGlow1.o
@echo [link]
@$(CC) -o $@ piGlow1.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ piGlow1.o $(LDFLAGS) $(LDLIBS)

piglow: piglow.o
@echo [link]
@$(CC) -o $@ piglow.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ piglow.o $(LDFLAGS) $(LDLIBS)

.c.o:
@echo [CC] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [CC] $<
$Q $(CC) -c $(CFLAGS) $< -o $@

clean:
@echo "[Clean]"
@rm -f $(OBJ) *~ core tags $(BINS)
$Q echo "[Clean]"
$Q rm -f $(OBJ) *~ core tags $(BINS)

tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)

install: piglow
@echo Installing piglow into /usr/local/bin
@cp -a piglow /usr/local/bin/piglow
@chmod 755 /usr/local/bin/piglow
@echo Done. Remember to load the I2C drivers!
$Q echo Installing piglow into /usr/local/bin
$Q cp -a piglow /usr/local/bin/piglow
$Q chmod 755 /usr/local/bin/piglow
$Q echo Done. Remember to load the I2C drivers!

depend:
makedepend -Y $(SRC)


+ 16
- 16
examples/q2w/Makefile Visa fil

@@ -46,37 +46,37 @@ BINS = $(SRC:.c=)
all: $(BINS)

blink: blink.o
@echo [link]
@$(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)

blink-io: blink-io.o
@echo [link]
@$(CC) -o $@ blink-io.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ blink-io.o $(LDFLAGS) $(LDLIBS)

button: button.o
@echo [link]
@$(CC) -o $@ button.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ button.o $(LDFLAGS) $(LDLIBS)

volts: volts.o
@echo [link]
@$(CC) -o $@ volts.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ volts.o $(LDFLAGS) $(LDLIBS)

bright: bright.o
@echo [link]
@$(CC) -o $@ bright.o $(LDFLAGS) $(LDLIBS)
$Q echo [link]
$Q $(CC) -o $@ bright.o $(LDFLAGS) $(LDLIBS)


.c.o:
@echo [CC] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [CC] $<
$Q $(CC) -c $(CFLAGS) $< -o $@

clean:
@echo "[Clean]"
@rm -f $(OBJ) *~ core tags $(BINS)
$Q echo "[Clean]"
$Q rm -f $(OBJ) *~ core tags $(BINS)

tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)

depend:
makedepend -Y $(SRC)


+ 20
- 20
gpio/Makefile Visa fil

@@ -52,43 +52,43 @@ version.h: ../VERSION
./newVersion

gpio: $(OBJ)
@echo [Link]
@$(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
$Q echo [Link]
$Q $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
.c.o:
@echo [Compile] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [Compile] $<
$Q $(CC) -c $(CFLAGS) $< -o $@

.PHONY: clean
clean:
@echo "[Clean]"
@rm -f $(OBJ) gpio *~ core tags *.bak
$Q echo "[Clean]"
$Q rm -f $(OBJ) gpio *~ core tags *.bak

.PHONY: tags
tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)

.PHONY: install
install: gpio
@echo "[Install]"
@cp gpio $(DESTDIR)$(PREFIX)/bin
@chown root.root $(DESTDIR)$(PREFIX)/bin/gpio
@chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio
@mkdir -p $(DESTDIR)$(PREFIX)/man/man1
@cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1
$Q echo "[Install]"
$Q cp gpio $(DESTDIR)$(PREFIX)/bin
$Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio
$Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio
$Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1
$Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1

.PHONY: install-deb
install-deb: gpio
@echo "[Install: deb]"
@install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/bin
@install -m 0755 gpio ~/wiringPi/debian/wiringPi/usr/bin
$Q echo "[Install: deb]"
$Q install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/bin
$Q install -m 0755 gpio ~/wiringPi/debian/wiringPi/usr/bin

.PHONY: uninstall
uninstall:
@echo "[UnInstall]"
@rm -f $(DESTDIR)$(PREFIX)/bin/gpio
@rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1
$Q echo "[UnInstall]"
$Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio
$Q rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1

.PHONY: depend
depend:


+ 5
- 5
pins/Makefile Visa fil

@@ -7,16 +7,16 @@ endif


all: ${SRC}
@echo Generating DVI
@latex pins.tex
$Q echo Generating DVI
$Q latex pins.tex

pins.dvi: pins.tex
@latex pins.tex
$Q latex pins.tex

pdf: pins.dvi
@dvipdf pins.dvi
$Q dvipdf pins.dvi


.PHONY: clean
clean:
@rm -f *.dvi *.aux *.log *.ps *.toc *.bak *~
$Q rm -f *.dvi *.aux *.log *.ps *.toc *.bak *~

+ 33
- 33
wiringPi/Makefile Visa fil

@@ -80,67 +80,67 @@ all: $(DYNAMIC)
static: $(STATIC)

$(STATIC): $(OBJ)
@echo "[Link (Static)]"
@ar rcs $(STATIC) $(OBJ)
@ranlib $(STATIC)
$Q echo "[Link (Static)]"
$Q ar rcs $(STATIC) $(OBJ)
$Q ranlib $(STATIC)
# @size $(STATIC)

$(DYNAMIC): $(OBJ)
@echo "[Link (Dynamic)]"
@$(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
$Q echo "[Link (Dynamic)]"
$Q $(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)

.c.o:
@echo [Compile] $<
@$(CC) -c $(CFLAGS) $< -o $@
$Q echo [Compile] $<
$Q $(CC) -c $(CFLAGS) $< -o $@


.PHONY: clean
clean:
@echo "[Clean]"
@rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*
$Q echo "[Clean]"
$Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*

.PHONY: tags
tags: $(SRC)
@echo [ctags]
@ctags $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)


.PHONY: install
install: $(DYNAMIC)
@echo "[Install Headers]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/include
@install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
@echo "[Install Dynamic Lib]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
@install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
@ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
@ldconfig
$Q echo "[Install Headers]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
$Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
$Q echo "[Install Dynamic Lib]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
$Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
$Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
$Q ldconfig

.PHONY: install-static
install-static: $(STATIC)
@echo "[Install Headers]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/include
@install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
@echo "[Install Static Lib]"
@install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
@install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib
$Q echo "[Install Headers]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
$Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
$Q echo "[Install Static Lib]"
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
$Q install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib

.PHONY: install-deb
install-deb: $(DYNAMIC)
@echo "[Install Headers: deb]"
@install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/include
@install -m 0644 $(HEADERS) ~/wiringPi/debian/wiringPi/usr/include
@echo "[Install Dynamic Lib: deb]"
$Q echo "[Install Headers: deb]"
$Q install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/include
$Q install -m 0644 $(HEADERS) ~/wiringPi/debian/wiringPi/usr/include
$Q echo "[Install Dynamic Lib: deb]"
install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/lib
install -m 0755 libwiringPi.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPi.so.$(VERSION)
ln -sf ~/wiringPi/debian/wiringPi/usr/lib/libwiringPi.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPi.so

.PHONY: uninstall
uninstall:
@echo "[UnInstall]"
@cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
@cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.*
@ldconfig
$Q echo "[UnInstall]"
$Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
$Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.*
$Q ldconfig


.PHONY: depend


Laddar…
Avbryt
Spara