Build identification strings
[novacoin.git] / src / makefile.unix
index 69ca0f7..c372736 100644 (file)
@@ -7,7 +7,7 @@ USE_UPNP:=0
 DEFS=-DNOPCH
 
 DEFS += $(addprefix -I,$(CURDIR) $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
-LIBS += $(addprefix -l,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
+LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
 
 LMODE = dynamic
 LMODE2 = dynamic
@@ -21,7 +21,7 @@ else
 endif
 
 # for boost 1.37, add -mt to the boost libraries
-LIBS= \
+LIBS += \
  -Wl,-B$(LMODE) \
    -l boost_system$(BOOST_LIB_SUFFIX) \
    -l boost_filesystem$(BOOST_LIB_SUFFIX) \
@@ -39,10 +39,6 @@ ifneq (${USE_UPNP}, -)
        DEFS += -DUSE_UPNP=$(USE_UPNP)
 endif
 
-ifneq (${USE_SSL}, 0)
-       DEFS += -DUSE_SSL
-endif
-
 LIBS+= \
  -Wl,-B$(LMODE2) \
    -l z \
@@ -85,12 +81,14 @@ LIBS+= \
 
 DEBUGFLAGS=-g
 CXXFLAGS=-O2
-xCXXFLAGS=-pthread -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat-security \
+xCXXFLAGS=-pthread -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat -Wformat-security \
     $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
 
 OBJS= \
+    obj/version.o \
     obj/checkpoints.o \
     obj/netbase.o \
+    obj/addrman.o \
     obj/crypter.o \
     obj/key.o \
     obj/db.o \
@@ -104,14 +102,19 @@ OBJS= \
     obj/rpcdump.o \
     obj/script.o \
     obj/util.o \
-    obj/wallet.o
+    obj/wallet.o \
+    obj/noui.o
 
 
 all: bitcoind
 
 # auto-generated dependencies:
 -include obj/*.P
--include obj/test/*.P
+-include obj-test/*.P
+
+build.h: FORCE
+       @../share/genbuild.sh build.h
+DEFS += -DHAVE_BUILD_INFO
 
 obj/%.o: %.cpp
        $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
@@ -120,12 +123,12 @@ obj/%.o: %.cpp
              -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
          rm -f $(@:%.o=%.d)
 
-bitcoind: $(OBJS:obj/%=obj/%)
+bitcoind: build.h $(OBJS:obj/%=obj/%)
        $(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
 
-TESTOBJS := $(patsubst test/%.cpp,obj/test/%.o,$(wildcard test/*.cpp))
+TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
 
-obj/test/%.o: test/%.cpp
+obj-test/%.o: test/%.cpp
        $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $<
        @cp $(@:%.o=%.d) $(@:%.o=%.P); \
          sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
@@ -138,6 +141,9 @@ test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
 clean:
        -rm -f bitcoind test_bitcoin
        -rm -f obj/*.o
-       -rm -f obj/test/*.o
+       -rm -f obj-test/*.o
        -rm -f obj/*.P
-       -rm -f obj/test/*.P
+       -rm -f obj-test/*.P
+       -rm -f src/build.h
+
+FORCE: