srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 1 | CC=gcc |
2 | CXX=g++ | ||||
srs5694 | 1c6f8b0 | 2010-02-21 11:09:20 -0500 | [diff] [blame] | 3 | CFLAGS+=-D_FILE_OFFSET_BITS=64 |
4 | CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 | ||||
5 | LDFLAGS+= | ||||
srs5694 | 55d9261 | 2010-03-07 22:16:07 -0500 | [diff] [blame] | 6 | LIB_NAMES=crc32 support guid partnotes gptpart mbr gpt bsd parttypes attributes diskio diskio-unix |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 7 | LIB_SRCS=$(NAMES:=.cc) |
8 | LIB_OBJS=$(LIB_NAMES:=.o) | ||||
9 | LIB_HEADERS=$(LIB_NAMES:=.h) | ||||
srs5694 | 0283dae | 2010-04-28 16:44:34 -0400 | [diff] [blame] | 10 | DEPEND= makedepend $(CXXFLAGS) |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 11 | |
srs5694 | ba00fed | 2010-01-12 18:18:36 -0500 | [diff] [blame] | 12 | all: gdisk sgdisk |
13 | |||||
srs5694 | 08bb0da | 2010-02-19 17:19:55 -0500 | [diff] [blame] | 14 | gdisk: $(LIB_OBJS) gdisk.o gpttext.o |
srs5694 | 9ba5421 | 2010-05-18 23:24:02 -0400 | [diff] [blame] | 15 | $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 16 | |
srs5694 | 1e09372 | 2010-01-05 00:14:19 -0500 | [diff] [blame] | 17 | sgdisk: $(LIB_OBJS) sgdisk.o |
srs5694 | 9ba5421 | 2010-05-18 23:24:02 -0400 | [diff] [blame] | 18 | $(CXX) $(LIB_OBJS) sgdisk.o $(LDFLAGS) -luuid -lpopt -o sgdisk |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 19 | |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 20 | lint: #no pre-reqs |
21 | lint $(SRCS) | ||||
22 | |||||
23 | clean: #no pre-reqs | ||||
srs5694 | ba00fed | 2010-01-12 18:18:36 -0500 | [diff] [blame] | 24 | rm -f core *.o *~ gdisk sgdisk |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 25 | |
26 | # what are the source dependencies | ||||
27 | depend: $(SRCS) | ||||
28 | $(DEPEND) $(SRCS) | ||||
29 | |||||
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 30 | $(OBJS): |
srs5694 | 0283dae | 2010-04-28 16:44:34 -0400 | [diff] [blame] | 31 | $(CRITICAL_CXX_FLAGS) |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 32 | |
33 | # DO NOT DELETE |