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