summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoderick W. Smith <rodsmith@rodsbooks.com>2014-03-02 12:55:01 -0500
committerRoderick W. Smith <rodsmith@rodsbooks.com>2014-03-02 12:55:01 -0500
commit3d170f186f75221befe269a4ac2246ff90cf1e3b (patch)
tree6a9c5155b04ace5c1af99dd27a3622d05ad00238
parentd28495e066ae8ea8dd37164ebaf7a52d932014f9 (diff)
downloadsgdisk-3d170f186f75221befe269a4ac2246ff90cf1e3b.tar.gz
New variant Makefile for 64-bit Windows builds.
-rw-r--r--Makefile.mingw6441
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile.mingw64 b/Makefile.mingw64
new file mode 100644
index 0000000..7e4b32b
--- /dev/null
+++ b/Makefile.mingw64
@@ -0,0 +1,41 @@
+CC=/usr/bin/x86_64-w64-mingw32-gcc
+CXX=/usr/bin/x86_64-w64-mingw32-g++
+STRIP=/usr/bin/x86_64-w64-mingw32-strip
+CFLAGS=-O2 -Wall -static -static-libgcc -static-libstdc++ -D_FILE_OFFSET_BITS=64 -g
+CXXFLAGS=-O2 -Wall -static -static-libgcc -static-libstdc++ -D_FILE_OFFSET_BITS=64 -g
+#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include -I/opt/local/include -g
+LIB_NAMES=guid gptpart bsd parttypes attributes crc32 mbrpart basicmbr mbr gpt support diskio diskio-windows
+MBR_LIBS=support diskio diskio-windows basicmbr mbrpart
+LIB_SRCS=$(NAMES:=.cc)
+LIB_OBJS=$(LIB_NAMES:=.o)
+MBR_LIB_OBJS=$(MBR_LIBS:=.o)
+LIB_HEADERS=$(LIB_NAMES:=.h)
+DEPEND= makedepend $(CFLAGS)
+
+all: gdisk fixparts
+
+gdisk: $(LIB_OBJS) gdisk.o gpttext.o
+ $(CXX) $(CXXFLAGS) $(LIB_OBJS) gdisk.o gpttext.o -lrpcrt4 -static-libgcc -o gdisk64.exe
+
+sgdisk: $(LIB_OBJS) sgdisk.o
+ $(CXX) $(CXXFLAGS) $(LIB_OBJS) sgdisk.o -lpopt -static-libgcc -o sgdisk64.exe
+
+fixparts: $(MBR_LIB_OBJS) fixparts.o
+ $(CXX) $(CXXFLAGS) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -static-libgcc -o fixparts64.exe
+
+lint: #no pre-reqs
+ lint $(SRCS)
+
+clean: #no pre-reqs
+ rm -f core *.o *~ gdisk64.exe sgdisk64.exe
+
+strip: #no pre-reqs
+ $(STRIP) gdisk64.exe fixparts64.exe
+
+# what are the source dependencies
+depend: $(SRCS)
+ $(DEPEND) $(SRCS)
+
+$(OBJS):
+
+# DO NOT DELETE