sgdisk program, misc. bug fixes
diff --git a/Makefile b/Makefile
index 9c73a7a..33a2ffc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,7 @@
CC=gcc
CXX=g++
-#CFLAGS=-O2 -fpack-struct
-CFLAGS=-O2 -fpack-struct -D_FILE_OFFSET_BITS=64 -g
-CXXFLAGS=-O2 -fpack-struct -Wuninitialized -Wreturn-type -D_FILE_OFFSET_BITS=64 -g
+CFLAGS=-O2 -D_FILE_OFFSET_BITS=64 -g
+CXXFLAGS=-O2 -Wuninitialized -Wreturn-type -D_FILE_OFFSET_BITS=64 -I/opt/local/include -g
LIB_NAMES=crc32 support gptpart mbr gpt bsd parttypes attributes
LIB_SRCS=$(NAMES:=.cc)
LIB_OBJS=$(LIB_NAMES:=.o)
@@ -12,11 +11,13 @@
#$(APPNAME): $(MBR2GPT_OBJS)
# $(CC) $(MBR2GPT_OBJS) -o $@
+all: gdisk sgdisk
+
gdisk: $(LIB_OBJS) gdisk.o
$(CXX) $(LIB_OBJS) gdisk.o -o gdisk
sgdisk: $(LIB_OBJS) sgdisk.o
- $(CXX) $(LIB_OBJS) sgdisk.o -o sgdisk
+ $(CXX) $(LIB_OBJS) sgdisk.o -L/opt/local/lib -lpopt -o sgdisk
wipegpt: $(LIB_OBJS) wipegpt.o
$(CXX) $(LIB_OBJS) wipegpt.o -o wipegpt
@@ -25,7 +26,7 @@
lint $(SRCS)
clean: #no pre-reqs
- rm -f core *.o *~ gdisk
+ rm -f core *.o *~ gdisk sgdisk
# what are the source dependencies
depend: $(SRCS)