PPCoin: Separate from bitcoin network; Rename directories and files
[novacoin.git] / src / makefile.unix
index 82d2a9f..76fead4 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright (c) 2009-2010 Satoshi Nakamoto
+# Copyright (c) 2011 The PPCoin developers
 # Distributed under the MIT/X11 software license, see the accompanying
 # file license.txt or http://www.opensource.org/licenses/mit-license.php.
 
@@ -8,6 +9,8 @@ WXINCLUDEPATHS=$(shell wx-config --cxxflags)
 
 WXLIBS=$(shell wx-config --libs)
 
+USE_UPNP:=0
+
 DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
 
 # for boost 1.37, add -mt to the boost libraries
@@ -21,17 +24,10 @@ LIBS= \
    -l ssl \
    -l crypto
 
-bitcoin: USE_UPNP:=1
-       ifdef USE_UPNP
-               LIBS += -l miniupnpc
-               DEFS += -DUSE_UPNP=$(USE_UPNP)
-       endif
-
-bitcoind: USE_UPNP:=0
-       ifdef USE_UPNP
-               LIBS += -l miniupnpc
-               DEFS += -DUSE_UPNP=$(USE_UPNP)
-       endif
+ifdef USE_UPNP
+       LIBS += -l miniupnpc
+       DEFS += -DUSE_UPNP=$(USE_UPNP)
+endif
 
 LIBS+= \
  -Wl,-Bdynamic \
@@ -87,9 +83,18 @@ test_bitcoin: obj/test/test_bitcoin.o
        $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
 
 clean:
-       -rm -f bitcoin bitcoind test_bitcoin
+       -rm -f bitcoin bitcoind test_bitcoin genesis
        -rm -f obj/*.o
        -rm -f obj/nogui/*.o
        -rm -f obj/test/*.o
        -rm -f cryptopp/obj/*.o
        -rm -f headers.h.gch
+       -rm -f ppcoin/obj/*.o
+
+ppcoin/obj/genesis.o: ppcoin/genesis.cpp
+       $(CXX) -c $(CXXFLAGS) -o $@ $<
+       $(CXX) -c $(CXXFLAGS) -DPPCOIN_GENESIS -o obj/nogui/init.o init.cpp
+
+genesis: ppcoin/obj/genesis.o $(OBJS:obj/%=obj/nogui/%)
+       $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+       -rm -f obj/nogui/init.o