chiark / gitweb /
wiringPi Version 2 - First commit (of v2)
[wiringPi.git] / gpio / Makefile
index a04396218f32c67ca1131fdebb63d5cab353215a..52b01509fe74c5b61c2d6f84345391a491102be5 100644 (file)
@@ -30,20 +30,20 @@ INCLUDE     = -I/usr/local/include
 CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
 
 LDFLAGS        = -L/usr/local/lib
-LIBS    = -lwiringPi -lpthread -lm
+LIBS    = -lwiringPi -lwiringPiDev -lpthread -lm
 
 # May not need to  alter anything below this line
 ###############################################################################
 
-SRC    =       gpio.c
+SRC    =       gpio.c extensions.c
 
 OBJ    =       $(SRC:.c=.o)
 
 all:           gpio
 
-gpio:  gpio.o
+gpio:  $(OBJ)
        @echo [Link]
-       @$(CC) -o $@ gpio.o $(LDFLAGS) $(LIBS)
+       @$(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
        
 .c.o:
        @echo [Compile] $<
@@ -51,7 +51,8 @@ gpio: gpio.o
 
 .PHONEY:       clean
 clean:
-       rm -f $(OBJ) gpio *~ core tags *.bak
+       @echo "[Clean]"
+       @rm -f $(OBJ) gpio *~ core tags *.bak
 
 .PHONEY:       tags
 tags:  $(SRC)
@@ -78,3 +79,6 @@ depend:
        makedepend -Y $(SRC)
 
 # DO NOT DELETE
+
+gpio.o: extensions.h
+extensions.o: extensions.h