Makefile.mingw 636 B

1234567891011121314151617181920212223242526272829303132333435
  1. ###########################################
  2. # Simple Makefile for HIDAPI test program
  3. #
  4. # Alan Ott
  5. # Signal 11 Software
  6. # 2010-06-01
  7. ###########################################
  8. all: hidtest libhidapi.dll
  9. CC=gcc
  10. CXX=g++
  11. COBJS=hid.o
  12. CPPOBJS=../hidtest/hidtest.o
  13. OBJS=$(COBJS) $(CPPOBJS)
  14. CFLAGS=-I../hidapi -g -c
  15. LIBS= -lsetupapi
  16. DLL_LDFLAGS = -mwindows -lsetupapi
  17. hidtest: $(OBJS)
  18. g++ -g $^ $(LIBS) -o hidtest
  19. libhidapi.dll: $(OBJS)
  20. $(CC) -g $^ $(DLL_LDFLAGS) -o libhidapi.dll
  21. $(COBJS): %.o: %.c
  22. $(CC) $(CFLAGS) $< -o $@
  23. $(CPPOBJS): %.o: %.cpp
  24. $(CXX) $(CFLAGS) $< -o $@
  25. clean:
  26. rm *.o ../hidtest/*.o hidtest.exe
  27. .PHONY: clean