Makefile 1.37 KB
Newer Older
1 2
CC=gcc
CXX=g++
3
CFLAGS+=-D_FILE_OFFSET_BITS=64
4 5
#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16
CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
6
LDFLAGS+=
7 8
LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
9
LIB_OBJS=$(LIB_NAMES:=.o)
10
MBR_LIB_OBJS=$(MBR_LIBS:=.o)
11
LIB_HEADERS=$(LIB_NAMES:=.h)
12
DEPEND= makedepend $(CXXFLAGS)
13

14
all:	cgdisk gdisk sgdisk fixparts
15

16
gdisk:	$(LIB_OBJS) gdisk.o gpttext.o
17 18
	$(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
#	$(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
19

20
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
21 22
	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncursesw -o cgdisk
#	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk
23 24

sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
25 26
	$(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
#	$(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
27

28 29 30
fixparts: $(MBR_LIB_OBJS) fixparts.o
	$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts

31 32 33
test:
	./gdisk_test.sh

34 35 36 37
lint:	#no pre-reqs
	lint $(SRCS)

clean:	#no pre-reqs
38
	rm -f core *.o *~ gdisk sgdisk cgdisk fixparts
39 40 41 42 43 44

# what are the source dependencies
depend: $(SRCS)
	$(DEPEND) $(SRCS)

$(OBJS):
45
	$(CRITICAL_CXX_FLAGS) 
46 47

# DO NOT DELETE