Makefile 1003 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Name: Makefile
  2. # Project: hid-data example
  3. # Author: Christian Starkjohann
  4. # Creation Date: 2008-04-11
  5. # Tabsize: 4
  6. # Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
  7. # License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  8. # This Revision: $Id: Makefile 692 2008-11-07 15:07:40Z cs $
  9. # Please read the definitions below and edit them as appropriate for your
  10. # system:
  11. # Use the following 3 lines on Unix and Mac OS X:
  12. USBFLAGS= `libusb-config --cflags`
  13. USBLIBS= `libusb-config --libs`
  14. EXE_SUFFIX=
  15. # Use the following 3 lines on Windows and comment out the 3 above:
  16. #USBFLAGS=
  17. #USBLIBS= -lhid -lusb -lsetupapi
  18. #EXE_SUFFIX= .exe
  19. CC= gcc
  20. CFLAGS= -O -Wall $(USBFLAGS)
  21. LIBS= $(USBLIBS)
  22. OBJ= hidtool.o hiddata.o
  23. PROGRAM= hidtool$(EXE_SUFFIX)
  24. all: $(PROGRAM)
  25. $(PROGRAM): $(OBJ)
  26. $(CC) -o $(PROGRAM) $(OBJ) $(LIBS)
  27. strip: $(PROGRAM)
  28. strip $(PROGRAM)
  29. clean:
  30. rm -f $(OBJ) $(PROGRAM)
  31. .c.o:
  32. $(CC) $(ARCH_COMPILE) $(CFLAGS) -c $*.c -o $*.o