1CXX=x86_64-w64-mingw32-g++ 2STRIP=x86_64-w64-mingw32-strip 3CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -g 4#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include -I/opt/local/include -g 5LDFLAGS+=-static -static-libgcc -static-libstdc++ 6LDLIBS+=-lrpcrt4 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 15# Note: cgdisk is buildable in Windows, but not in Ubuntu 20.04 or 22.04 16all: gdisk sgdisk fixparts 17 18gdisk: $(LIB_OBJS) gdisk.o gpttext.o 19 $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(LDLIBS) -o gdisk64.exe 20 21cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o 22 $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(LDLIBS) -lncursesw -o cgdisk64.exe 23 24sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o 25 $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) $(LDLIBS) -lpopt -lintl -liconv -o sgdisk64.exe 26 27fixparts: $(MBR_LIB_OBJS) fixparts.o 28 $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts64.exe 29 30lint: #no pre-reqs 31 lint $(SRCS) 32 33clean: #no pre-reqs 34 rm -f core *.o *~ gdisk64.exe cgdisk64.exe sgdisk64.exe fixparts64.exe 35 36strip: #no pre-reqs 37 $(STRIP) gdisk64.exe cgdisk64.exe sgdisk64.exe fixparts64.exe 38 39# what are the source dependencies 40depend: $(SRCS) 41 $(DEPEND) $(SRCS) 42 43$(OBJS): 44 45# DO NOT DELETE 46