diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-01-12 20:02:47 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-01-12 20:02:47 -0500 |
commit | a1de57a063af397612bb77f87c803c578d04f8e5 (patch) | |
tree | 89195dc59b21098e0d747d88e2f4c1ee6ba9d9f0 /src/makefile.osx | |
parent | 025d495481f2313a1550d8d101415ff3e3a6b89f (diff) |
Compile with extra warnings turned on. And more makefile/code tidying up.
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings.
Exceptions are:
-Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned.
-Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
Diffstat (limited to 'src/makefile.osx')
-rw-r--r-- | src/makefile.osx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/makefile.osx b/src/makefile.osx index 78ecdb8d90..fd60f6233d 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -46,7 +46,9 @@ DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL DEBUGFLAGS=-g # ppc doesn't work because we don't support big-endian -CFLAGS=-mmacosx-version-min=10.5 -arch i386 -O3 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +CFLAGS=-mmacosx-version-min=10.5 -arch i386 -O3 \ + -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat-security \ + $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) OBJS= \ obj/checkpoints.o \ @@ -78,17 +80,17 @@ endif all: bitcoind # auto-generated dependencies: --include obj/nogui/*.P +-include obj/*.P -include obj/test/*.P -obj/nogui/%.o: %.cpp +obj/%.o: %.cpp $(CXX) -c $(CFLAGS) -MMD -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ rm -f $(@:%.o=%.d) -bitcoind: $(OBJS:obj/%=obj/nogui/%) +bitcoind: $(OBJS:obj/%=obj/%) $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) TESTOBJS := $(patsubst test/%.cpp,obj/test/%.o,$(wildcard test/*.cpp)) @@ -100,14 +102,12 @@ obj/test/%.o: test/%.cpp -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ rm -f $(@:%.o=%.d) -test_bitcoin: $(TESTOBJS) $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%)) +test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(DEPSDIR)/lib/libboost_unit_test_framework-mt.a clean: -rm -f bitcoind test_bitcoin -rm -f obj/*.o - -rm -f obj/nogui/*.o -rm -f obj/test/*.o -rm -f obj/*.P - -rm -f obj/nogui/*.P -rm -f obj/test/*.P |