diff --git a/testgui/Makefile b/testgui/Makefile index d861aed..54af870 100644 --- a/testgui/Makefile +++ b/testgui/Makefile @@ -3,9 +3,20 @@ OS=$(shell uname) ifeq ($(OS), Darwin) -FILE=Makefile.mac -else -FILE=Makefile.linux + FILE=Makefile.mac endif -include $(FILE) \ No newline at end of file +ifneq (,$(findstring MINGW,$(OS))) + FILE=Makefile.mingw +endif + +ifeq ($(OS), Linux) + FILE=Makefile.linux +endif + +ifeq ($(FILE), ) +all: + $(error Your platform ${OS} is not supported at this time.) +endif + +include $(FILE) diff --git a/testgui/Makefile.mingw b/testgui/Makefile.mingw new file mode 100644 index 0000000..f01c13e --- /dev/null +++ b/testgui/Makefile.mingw @@ -0,0 +1,32 @@ +########################################### +# Simple Makefile for HIDAPI test program +# +# Alan Ott +# Signal 11 Software +# 2010-06-01 +########################################### + +all: testgui + +CC=gcc +CXX=g++ +COBJS= +CPPOBJS=../windows/hid.o test.o +OBJS=$(COBJS) $(CPPOBJS) +CFLAGS=-I../hidapi -I../../hidapi-externals/fox/include -g -c +LIBS= -lsetupapi -L../../hidapi-externals/fox/lib -lFOX-1.6 -lgdi32 -Wl,--enable-auto-import -lkernel32 + + +testgui: $(OBJS) + g++ -g $^ $(LIBS) -o testgui + +$(COBJS): %.o: %.c + $(CC) $(CFLAGS) $< -o $@ + +$(CPPOBJS): %.o: %.cpp + $(CXX) $(CFLAGS) $< -o $@ + +clean: + rm *.o testgui.exe + +.PHONY: clean diff --git a/windows/Makefile b/windows/Makefile new file mode 100644 index 0000000..ac471d6 --- /dev/null +++ b/windows/Makefile @@ -0,0 +1,14 @@ + + +OS=$(shell uname) + +ifneq (,$(findstring MINGW,$(OS))) + FILE=Makefile.mingw +endif + +ifeq ($(FILE), ) +all: + $(error Your platform ${OS} is not supported at this time.) +endif + +include $(FILE) diff --git a/windows/Makefile.mingw b/windows/Makefile.mingw new file mode 100644 index 0000000..70181e1 --- /dev/null +++ b/windows/Makefile.mingw @@ -0,0 +1,32 @@ +########################################### +# Simple Makefile for HIDAPI test program +# +# Alan Ott +# Signal 11 Software +# 2010-06-01 +########################################### + +all: hidtest + +CC=gcc +CXX=g++ +COBJS= +CPPOBJS=../hidtest/hidtest.o hid.o +OBJS=$(COBJS) $(CPPOBJS) +CFLAGS=-I../hidapi -g -c +LIBS= -lsetupapi + + +hidtest: $(OBJS) + g++ -g $^ $(LIBS) -o hidtest + +$(COBJS): %.o: %.c + $(CC) $(CFLAGS) $< -o $@ + +$(CPPOBJS): %.o: %.cpp + $(CXX) $(CFLAGS) $< -o $@ + +clean: + rm *.o ../hidtest/*.o hidtest.exe + +.PHONY: clean