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 readall.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] $<
.PHONEY: clean
clean:
- rm -f $(OBJ) gpio *~ core tags *.bak
+ @echo "[Clean]"
+ @rm -f $(OBJ) gpio *~ core tags *.bak
.PHONEY: tags
tags: $(SRC)
makedepend -Y $(SRC)
# DO NOT DELETE
+
+gpio.o: extensions.h
+extensions.o: extensions.h