Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CC=$(TOOLPREFIX)gcc
- #CFLAGS=-I.
- all: hcitool hciconfig hcidump
- hcitool: hcitool.o bluelib.a #bluelib.a is the dependency for the executable
- ${CC} -lm -o hcitool hcitool.o -L. bluelib.a
- hciconfig: hciconfig.o bluelib.a
- ${CC} -lm -o hciconfig hciconfig.o -L. bluelib.a
- hcidump: hcidump.o bluelib.a
- ${CC} -lm -o hcidump hcidump.o -L. bluelib.a
- bluetooth.o: lib/bluetooth.c lib/bluetooth.h lib/hci.h
- ${CC} -O -c lib/bluetooth.c
- hci.o: lib/hci.c lib/bluetooth.h lib/hci.h lib/hci_lib.h
- ${CC} -O -c lib/hci.c
- parser.o: parser/parser.c parser/parser.h parser/rfcomm.h
- ${CC} -O -c parser/parser.c
- rfcomm.o: parser/rfcomm.c parser/parser.h parser/rfcomm.h parser/sdp.h
- ${CC} -O -c parser/rfcomm.c
- sdp.o: parser/sdp.c parser/parser.h parser/sdp.h
- ${CC} -O -c parser/sdp.c
- util.o: parser/util.c parser/util.h
- ${CC} -O -c parser/util.c
- bluelib.a: bluetooth.o hci.o parser.o sdp.o util.o rfcomm.o #let's link library files into a static library
- ar rcs bluelib.a bluetooth.o hci.o parser.o sdp.o util.o rfcomm.o
- libs: bluelib.a
- clean:
- rm -f bluetools *.o *.a *.gch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement