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