summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL9
-rw-r--r--src/NMakefile25
2 files changed, 25 insertions, 9 deletions
diff --git a/INSTALL b/INSTALL
index 0d9ea01..f302346 100644
--- a/INSTALL
+++ b/INSTALL
@@ -41,12 +41,13 @@ Building on Windows
* json-c:
- # Open and convert json-c.vcproj
- copy config.h.win32 config.h
- copy json_config.h.in json_config.h
+ # Check out a working Windows fork from
+ # http://github.com/andreasbaumann/json-c
+ # Open windows\json-c.sln
# Choose Debug/Release
- # eventually convert the solutions
# build
+ # copy *.h to Include\json-c directory
+ # copy static *.lib from windows to lib
* biruda
diff --git a/src/NMakefile b/src/NMakefile
index 562fb90..9954310 100644
--- a/src/NMakefile
+++ b/src/NMakefile
@@ -4,6 +4,7 @@ CYGWIN_PATH = C:\cygwin\bin
CONFUSE_DIR = C:\develop\confuse-2.7
PTHREADS_W32_DIR = C:\develop\pthreads-w32-2-9-1-release
NANOMSG_DIR = C:\develop\nanomsg-0.4-beta
+JSON_C_DIR = C:\develop\json-c
GENGETOPT = $(CYGWIN_DIR)\usr\local\bin\gengetopt.exe
@@ -17,11 +18,18 @@ LINK = link
INCLUDE_DIRS = \
/I$(CONFUSE_DIR)\include \
/I$(PTHREADS_W32_DIR) \
- /I$(NANOMSG_DIR)\include
+ /I$(NANOMSG_DIR)\include \
+ /I$(JSON_C_DIR)\include
+
+LIB_DIRS = \
+ /LIBPATH:$(CONFUSE_DIR)\lib \
+ /LIBPATH:$(PTHREADS_W32_DIR) \
+ /LIBPATH:$(NANOMSG_DIR)\lib \
+ /LIBPATH:$(JSON_C_DIR)\lib
-CLFLAGS = /TP /MD /W2 /WX /nologo /O2 $(INCLUDE_DIRS)
-LINKFLAGS = /nologo
-LIBS =
+CLFLAGS = /TP /MDd /W2 /WX /nologo /O2 $(INCLUDE_DIRS)
+LINKFLAGS = /nologo $(LIB_DIRS)
+LIBS = libConfuse.lib pthreadVC2d.lib nanomsg.lib json-c.lib
.SUFFIXES: .c .obj .exe
@@ -31,7 +39,7 @@ LIBS =
all: biruda.exe
biruda.exe: biruda.obj biruda_cmdline.obj master.obj coordinator.obj worker.obj
- $(LINK) $(LINKFLAGS) -$(LIBS) /out:$@ $**
+ $(LINK) $(LINKFLAGS) $(LIBS) /out:$@ $**
biruda_cmdline.obj: biruda_cmdline.c
biruda.obj: biruda.c biruda_cmdline.h master.h coordinator.h worker.h sleep.h
@@ -47,6 +55,13 @@ biruda_cmdline.h: biruda.ggo
clean:
@-erase *.obj 2>NUL
+ @-erase *.dll 2>NUL
@-erase biruda.exe 2>NUL
@-erase biruda_cmdline.h biruda_cmdline.c 2>NUL
+
+run:
+ @-copy $(CONFUSE_DIR)\bin\libConfuse.dll .
+ @-copy $(PTHREADS_W32_DIR)\pthreadVC2d.dll .
+ @-copy $(NANOMSG_DIR)\bin\nanomsg.dll .
+ @-biruda -c biruda.conf -p