srs5694 | 3b29c89 | 2010-02-21 13:31:46 -0500 | [diff] [blame^] | 1 | CC=gcc |
| 2 | CXX=g++ |
| 3 | CFLAGS=-O2 -D_FILE_OFFSET_BITS=64 -g |
| 4 | CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include -I/opt/local/include -g |
| 5 | LIB_NAMES=crc32 support guid gptpart mbr gpt bsd parttypes attributes diskio diskio-unix |
| 6 | LIB_SRCS=$(NAMES:=.cc) |
| 7 | LIB_OBJS=$(LIB_NAMES:=.o) |
| 8 | LIB_HEADERS=$(LIB_NAMES:=.h) |
| 9 | DEPEND= makedepend $(CFLAGS) |
| 10 | |
| 11 | all: gdisk sgdisk |
| 12 | |
| 13 | gdisk: $(LIB_OBJS) gpttext.o gdisk.o |
| 14 | $(CXX) $(LIB_OBJS) gpttext.o gdisk.o -o gdisk |
| 15 | |
| 16 | sgdisk: $(LIB_OBJS) sgdisk.o |
| 17 | $(CXX) $(LIB_OBJS) sgdisk.o -L/opt/local/lib -lpopt -o sgdisk |
| 18 | |
| 19 | testguid: $(LIB_OBJS) testguid.o |
| 20 | $(CXX) $(LIB_OBJS) testguid.o -o testguid |
| 21 | |
| 22 | lint: #no pre-reqs |
| 23 | lint $(SRCS) |
| 24 | |
| 25 | clean: #no pre-reqs |
| 26 | rm -f core *.o *~ gdisk sgdisk |
| 27 | |
| 28 | # what are the source dependencies |
| 29 | depend: $(SRCS) |
| 30 | $(DEPEND) $(SRCS) |
| 31 | |
| 32 | $(OBJS): |
| 33 | |
| 34 | # DO NOT DELETE |