From da99818b81117ea62fc25fbbdae1b1ae56eab8c5 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 15 Dec 2015 15:01:58 +0100 Subject: Added mxe-based win32 build --- icepack/Makefile | 5 +++++ iceprog/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/icepack/Makefile b/icepack/Makefile index 559a66d..a89aa1f 100644 --- a/icepack/Makefile +++ b/icepack/Makefile @@ -2,6 +2,7 @@ CXX ?= clang LDLIBS = -lm -lstdc++ CXXFLAGS = -MD -O0 -ggdb -Wall -std=c++11 -I/usr/local/include +MXEGCC = /usr/local/src/mxe/usr/bin/i686-pc-mingw32-gcc CC = $(CXX) DESTDIR = /usr/local @@ -9,6 +10,9 @@ all: icepack iceunpack icepack: icepack.o +icepack.exe: icepack.cc + $(MXEGCC) -std=c++11 -o icepack.exe -Os icepack.cc -lm -lstdc++ + iceunpack: icepack ln -sf icepack iceunpack @@ -23,6 +27,7 @@ uninstall: clean: rm -f icepack rm -f iceunpack + rm -f icepack.exe rm -f *.o *.d -include *.d diff --git a/iceprog/Makefile b/iceprog/Makefile index a32f2b7..578a3e3 100644 --- a/iceprog/Makefile +++ b/iceprog/Makefile @@ -1,12 +1,16 @@ # CC = clang LDLIBS = -L/usr/local/lib -lftdi -lm CFLAGS = -MD -O0 -ggdb -Wall -std=c99 -I/usr/local/include +MXEGCC = /usr/local/src/mxe/usr/bin/i686-pc-mingw32-gcc DESTDIR = /usr/local all: iceprog iceprog: iceprog.o +iceprog.exe: iceprog.c + $(MXEGCC) -std=c99 -o iceprog.exe -Os iceprog.c -lftdi -lusb -lm + install: all cp iceprog $(DESTDIR)/bin/iceprog @@ -15,6 +19,7 @@ uninstall: clean: rm -f iceprog + rm -f iceprog.exe rm -f *.o *.d -include *.d -- cgit v1.2.3