aboutsummaryrefslogtreecommitdiff
path: root/src/makefile.mingw
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile.mingw')
-rw-r--r--src/makefile.mingw16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/makefile.mingw b/src/makefile.mingw
index 5584df5603..abcdcce675 100644
--- a/src/makefile.mingw
+++ b/src/makefile.mingw
@@ -27,6 +27,7 @@ DEFS=-DWIN32 -D_WINDOWS -DNOPCH -DBOOST_THREAD_USE_LIB
DEBUGFLAGS=-g
CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
+TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
ifdef USE_UPNP
INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
@@ -71,17 +72,16 @@ obj/%.o: %.cpp $(HEADERS)
bitcoind.exe: $(OBJS:obj/%=obj/%)
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
-obj/test/test_bitcoin.o: $(wildcard test/*.cpp) $(HEADERS)
- g++ -c $(CFLAGS) -o $@ test/test_bitcoin.cpp
+TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
-test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
- g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
+obj-test/%.o: test/%.cpp $(HEADERS)
+ g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<
+
+test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
+ g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)
clean:
-del /Q bitcoind test_bitcoin
-del /Q obj\*
- -del /Q obj\nogui\*
- -del /Q obj\test\*
- -del /Q test\*.o
- -del /Q headers.h.gch
+ -del /Q obj-test\*
-del /Q build.h