1CC=/usr/bin/x86_64-w64-mingw32-gcc
2CXX=/usr/bin/x86_64-w64-mingw32-g++
3STRIP=/usr/bin/x86_64-w64-mingw32-strip
4CFLAGS=-O2 -Wall -static -static-libgcc -static-libstdc++  -D_FILE_OFFSET_BITS=64 -g
5CXXFLAGS=-O2 -Wall -static -static-libgcc -static-libstdc++ -D_FILE_OFFSET_BITS=64 -g
6#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include -I/opt/local/include -g
7LIB_NAMES=guid gptpart bsd parttypes attributes crc32 mbrpart basicmbr mbr gpt support diskio diskio-windows
8MBR_LIBS=support diskio diskio-windows basicmbr mbrpart
9LIB_SRCS=$(NAMES:=.cc)
10LIB_OBJS=$(LIB_NAMES:=.o)
11MBR_LIB_OBJS=$(MBR_LIBS:=.o)
12LIB_HEADERS=$(LIB_NAMES:=.h)
13DEPEND= makedepend $(CFLAGS)
14
15all:	gdisk fixparts
16
17gdisk:	$(LIB_OBJS) gdisk.o gpttext.o
18	$(CXX) $(CXXFLAGS) $(LIB_OBJS) gdisk.o gpttext.o -lrpcrt4 -static-libgcc -o gdisk64.exe
19
20sgdisk: $(LIB_OBJS) sgdisk.o
21	$(CXX) $(CXXFLAGS) $(LIB_OBJS) sgdisk.o -lpopt -static-libgcc -o sgdisk64.exe
22
23fixparts: $(MBR_LIB_OBJS) fixparts.o
24	$(CXX) $(CXXFLAGS) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -static-libgcc -o fixparts64.exe
25
26lint:	#no pre-reqs
27	lint $(SRCS)
28
29clean:	#no pre-reqs
30	rm -f core *.o *~ gdisk64.exe sgdisk64.exe
31
32strip:	#no pre-reqs
33	$(STRIP) gdisk64.exe fixparts64.exe
34
35# what are the source dependencies
36depend: $(SRCS)
37	$(DEPEND) $(SRCS)
38
39$(OBJS):
40
41# DO NOT DELETE
42