Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
gptfdisk/Makefile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
72 lines (58 sloc)
2.13 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=gcc | |
CXX=g++ | |
CFLAGS+=-D_FILE_OFFSET_BITS=64 | |
#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 | |
CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 | |
LDFLAGS+= | |
LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix | |
MBR_LIBS=support diskio diskio-unix basicmbr mbrpart | |
LIB_OBJS=$(LIB_NAMES:=.o) | |
MBR_LIB_OBJS=$(MBR_LIBS:=.o) | |
LIB_HEADERS=$(LIB_NAMES:=.h) | |
DEPEND= makedepend $(CXXFLAGS) | |
PREFIX = /usr | |
EPREFIX = ${PREFIX} | |
SBINDIR = ${EPREFIX}/sbin | |
BINDIR = ${EPREFIX}/bin | |
LIBDIR = ${EPREFIX}/lib | |
LIBEXECDIR = ${EPREFIX}/libexec | |
DATADIR = ${PREFIX}/share | |
MANDIR = ${DATADIR}/man | |
SYSCONFDIR = ${PREFIX}/etc | |
LOCALSTATEDIR = ${PREFIX}/var | |
DESTDIR= | |
all: cgdisk gdisk sgdisk fixparts | |
gdisk: $(LIB_OBJS) gdisk.o gpttext.o | |
$(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk | |
# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk | |
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o | |
$(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 | |
sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o | |
$(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 | |
fixparts: $(MBR_LIB_OBJS) fixparts.o | |
$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts | |
test: | |
./gdisk_test.sh | |
lint: #no pre-reqs | |
lint $(SRCS) | |
clean: #no pre-reqs | |
rm -f core *.o *~ gdisk sgdisk cgdisk fixparts | |
# what are the source dependencies | |
depend: $(SRCS) | |
$(DEPEND) $(SRCS) | |
$(OBJS): | |
$(CRITICAL_CXX_FLAGS) | |
# DO NOT DELETE | |
install: all | |
install -m 0755 -d ${DESTDIR}${BINDIR} | |
install -m 0755 gdisk ${DESTDIR}${BINDIR} | |
install -m 0755 cgdisk ${DESTDIR}${BINDIR} | |
install -m 0755 sgdisk ${DESTDIR}${BINDIR} | |
install -m 0755 fixparts ${DESTDIR}${BINDIR} | |
install -m 0755 -d ${DESTDIR}${MANDIR}/man8 | |
install -m 0644 gdisk.8 ${DESTDIR}${MANDIR}/man8 | |
install -m 0644 cgdisk.8 ${DESTDIR}${MANDIR}/man8 | |
install -m 0644 sgdisk.8 ${DESTDIR}${MANDIR}/man8 | |
install -m 0644 fixparts.8 ${DESTDIR}${MANDIR}/man8 |