Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.17 KB | None | 0 0
  1. CC=$(TOOLPREFIX)gcc
  2. #CFLAGS=-I.
  3.  
  4. all: hcitool hciconfig hcidump
  5.  
  6. hcitool: hcitool.o bluelib.a #bluelib.a is the dependency for the executable
  7.         ${CC} -lm -o hcitool hcitool.o -L. bluelib.a
  8.  
  9. hciconfig: hciconfig.o bluelib.a
  10.         ${CC} -lm -o hciconfig hciconfig.o -L. bluelib.a
  11.  
  12. hcidump: hcidump.o bluelib.a
  13.         ${CC} -lm -o hcidump hcidump.o -L. bluelib.a
  14.  
  15. bluetooth.o: lib/bluetooth.c lib/bluetooth.h lib/hci.h
  16.         ${CC} -O -c lib/bluetooth.c
  17.  
  18. hci.o: lib/hci.c lib/bluetooth.h lib/hci.h lib/hci_lib.h
  19.         ${CC} -O -c lib/hci.c
  20.  
  21. parser.o: parser/parser.c parser/parser.h parser/rfcomm.h
  22.         ${CC} -O -c parser/parser.c
  23.  
  24. rfcomm.o: parser/rfcomm.c parser/parser.h parser/rfcomm.h parser/sdp.h
  25.         ${CC} -O -c parser/rfcomm.c
  26.  
  27. sdp.o: parser/sdp.c parser/parser.h parser/sdp.h
  28.         ${CC} -O -c parser/sdp.c
  29.  
  30. util.o: parser/util.c parser/util.h
  31.         ${CC} -O -c parser/util.c
  32.  
  33. bluelib.a: bluetooth.o hci.o parser.o sdp.o util.o rfcomm.o #let's link library files into a static library
  34.         ar rcs bluelib.a bluetooth.o hci.o parser.o sdp.o util.o rfcomm.o
  35.  
  36. libs: bluelib.a
  37.  
  38. clean:
  39.         rm -f bluetools *.o *.a *.gch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement