blob: b03f3bf88d0182c22297a0079adbf2cc3eca53cb [file] [log] [blame]
srs5694e7b4ff92009-08-18 13:16:10 -04001CC=gcc
2CXX=g++
srs56941c6f8b02010-02-21 11:09:20 -05003CFLAGS+=-D_FILE_OFFSET_BITS=64
4CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
5LDFLAGS+=
srs569455d92612010-03-07 22:16:07 -05006LIB_NAMES=crc32 support guid partnotes gptpart mbr gpt bsd parttypes attributes diskio diskio-unix
srs5694e7b4ff92009-08-18 13:16:10 -04007LIB_SRCS=$(NAMES:=.cc)
8LIB_OBJS=$(LIB_NAMES:=.o)
9LIB_HEADERS=$(LIB_NAMES:=.h)
srs56940283dae2010-04-28 16:44:34 -040010DEPEND= makedepend $(CXXFLAGS)
srs5694e7b4ff92009-08-18 13:16:10 -040011
srs5694ba00fed2010-01-12 18:18:36 -050012all: gdisk sgdisk
13
srs569408bb0da2010-02-19 17:19:55 -050014gdisk: $(LIB_OBJS) gdisk.o gpttext.o
srs56949ba54212010-05-18 23:24:02 -040015 $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
srs5694e7b4ff92009-08-18 13:16:10 -040016
srs56941e093722010-01-05 00:14:19 -050017sgdisk: $(LIB_OBJS) sgdisk.o
srs56949ba54212010-05-18 23:24:02 -040018 $(CXX) $(LIB_OBJS) sgdisk.o $(LDFLAGS) -luuid -lpopt -o sgdisk
srs56946699b012010-02-04 00:55:30 -050019
srs5694e7b4ff92009-08-18 13:16:10 -040020lint: #no pre-reqs
21 lint $(SRCS)
22
23clean: #no pre-reqs
srs5694ba00fed2010-01-12 18:18:36 -050024 rm -f core *.o *~ gdisk sgdisk
srs5694e7b4ff92009-08-18 13:16:10 -040025
26# what are the source dependencies
27depend: $(SRCS)
28 $(DEPEND) $(SRCS)
29
srs5694978041c2009-09-21 20:51:47 -040030$(OBJS):
srs56940283dae2010-04-28 16:44:34 -040031 $(CRITICAL_CXX_FLAGS)
srs5694e7b4ff92009-08-18 13:16:10 -040032
33# DO NOT DELETE