1CC=gcc 2CXX=clang++ 3FATBINFLAGS=-arch x86_64 -arch i386 -mmacosx-version-min=10.4 4THINBINFLAGS=-arch x86_64 -mmacosx-version-min=10.4 5CFLAGS=$(FATBINFLAGS) -O2 -D_FILE_OFFSET_BITS=64 -g 6#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/opt/local/include -I/usr/local/include -I/opt/local/include -g 7CXXFLAGS=$(FATBINFLAGS) -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/opt/local/include -I /usr/local/include -I/opt/local/include -g 8LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix 9MBR_LIBS=support diskio diskio-unix basicmbr mbrpart 10#LIB_SRCS=$(NAMES:=.cc) 11LIB_OBJS=$(LIB_NAMES:=.o) 12MBR_LIB_OBJS=$(MBR_LIBS:=.o) 13LIB_HEADERS=$(LIB_NAMES:=.h) 14DEPEND= makedepend $(CFLAGS) 15 16all: gdisk sgdisk cgdisk fixparts 17 18gdisk: $(LIB_OBJS) gpttext.o gdisk.o 19 $(CXX) $(LIB_OBJS) gpttext.o gdisk.o $(FATBINFLAGS) -o gdisk 20# $(CXX) $(LIB_OBJS) -L/usr/lib -licucore gpttext.o gdisk.o -o gdisk 21 22cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o 23 $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o /usr/lib/libncurses.dylib $(LDFLAGS) $(FATBINFLAGS) -o cgdisk 24# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licucore -lncurses -o cgdisk 25 26sgdisk: $(LIB_OBJS) gptcl.o sgdisk.o 27# $(CXX) $(LIB_OBJS) gptcl.o sgdisk.o /opt/local/lib/libiconv.a /opt/local/lib/libintl.a /opt/local/lib/libpopt.a $(FATBINFLAGS) -o sgdisk 28 $(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/usr/local/lib -lpopt $(THINBINFLAGS) -o sgdisk 29# $(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/sw/lib -licucore -lpopt -o sgdisk 30 31fixparts: $(MBR_LIB_OBJS) fixparts.o 32 $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) $(FATBINFLAGS) -o fixparts 33 34testguid: $(LIB_OBJS) testguid.o 35 $(CXX) $(LIB_OBJS) testguid.o -o testguid 36 37lint: #no pre-reqs 38 lint $(SRCS) 39 40clean: #no pre-reqs 41 rm -f core *.o *~ gdisk sgdisk cgdisk fixparts 42 43# what are the source dependencies 44depend: $(SRCS) 45 $(DEPEND) $(SRCS) 46 47$(OBJS): 48 49# DO NOT DELETE 50