On 07.02.13 13:31, Bernd Machenschalk wrote:

As the previous patch was already committed to the master branch, here's another one that must be applied on to of it. I guess the wrapper will be a rather common thing to build with whatever environment, so I added a 'wrapper' target to the Makefile for convenience. However, this looks increasingly misplaced in lib/, maybe we should move the Makefile.mingw to the win_build/ directory at some point. The second patch is not necessary for the boinc_zip or wrapper build, it is just something that makes the list of libboinc objects better readable and maintainable.

Hm. The patches on the list are messed up the same way as the last one. Some MTA 
stumbled upon a 'From ' line in the attachments and made it '>From '

Sending again, stripped of first line.

Bernd

From: Bernd Machenschalk <[email protected]>
Date: Thu, 7 Feb 2013 13:01:06 +0100
Subject: [PATCH 1/2] fix Makefile.mingw for recent boinc_zip #2

---
 lib/Makefile.mingw |   99 +++++++++++++++++++++++++++++++---------------------
 1 files changed, 59 insertions(+), 40 deletions(-)

diff --git a/lib/Makefile.mingw b/lib/Makefile.mingw
index b23fb80..dbc9e44 100644
--- a/lib/Makefile.mingw
+++ b/lib/Makefile.mingw
@@ -51,37 +51,38 @@ LIB_OBJ = util.o win_util.o app_ipc.o diagnostics.o 
diagnostics_win.o filesys.o
        hostinfo.o md5.o md5_file.o mem_usage.o mfile.o miofile.o 
procinfo_win.o procinfo.o proc_control.o parse.o prefs.o \
        proxy_info.o str_util.o shmem.o base64.o stackwalker_win.o url.o 
coproc.o
 
-ZIP_OBJ = boinc_zip.o \
-       api.o \
-       apihelp.o \
-       crc32.o \
-       explode.o \
-       extract.o \
-       fileio.o \
-       globals.o \
-       inflate.o \
-       list.o \
-       match.o \
-       nt.o \
-       process.o \
-       ttyio.o \
-       unreduce.o \
-       unshrink.o \
-       unzip.o \
-       win32.o \
-       zipinfo.o \
-       deflate.o \
-       trees.o \
-       util.o \
-       win32_boinc.o \
-       win32i64.o \
-       win32zip.o \
-       z_fileio.o \
-       z_globals.o \
-       z_nt.o \
-       zip.o \
-       zipfile.o \
-       zipup.o
+ZIP_OBJ = zip/boinc_zip.o \
+       zip/api.o \
+       zip/apihelp.o \
+       zip/crc32.o \
+       zip/crypt.o \
+       zip/explode.o \
+       zip/extract.o \
+       zip/fileio.o \
+       zip/globals.o \
+       zip/inflate.o \
+       zip/list.o \
+       zip/match.o \
+       zip/nt.o \
+       zip/process.o \
+       zip/ttyio.o \
+       zip/unreduce.o \
+       zip/unshrink.o \
+       zip/unzip.o \
+       zip/zipinfo.o \
+       zip/deflate.o \
+       zip/trees.o \
+       zip/util.o \
+       zip/win32.o \
+       zip/win32_boinc.o \
+       zip/win32i64.o \
+       zip/win32zip.o \
+       zip/z_fileio.o \
+       zip/z_globals.o \
+       zip/z_nt.o \
+       zip/zip.o \
+       zip/zipfile.o \
+       zip/zipup.o
 
 # libraries to build
 API_BIN = libboinc_api.a
@@ -116,7 +117,10 @@ CCXXFLAGS = $(INCS) $(DEBUG) --include 
$(BOINC_SRC)/version.h -DEINSTEINATHOME_C
        -DNODB -D_CONSOLE -fexceptions $(OPTFLAGS) $(NOCYGWIN)
 
 # flags for compiling boinc_zip
-ZIP_FLAGS = -DWIN32 -D_LIB -D_MBCS -DNO_MKTEMP $(INCS) -O2 -DDLL -DUSE_ZIPMAIN 
$(NOCYGWIN)
+BOINC_ZIP_VCPROJ_FLAGS = -DWIN32 -D_LIB -DDLL -D_CRT_SECURE_NO_WARNINGS 
-DNO_MKTEMP -DUSE_ZIPMAIN -DNO_CRYPT \
+       -DIZ_PWLEN=80 -DNO_ASM -DNO_UNICODE_SUPPORT -Dinflate=inflate_boinc 
-Ddeflate=deflate_boinc \
+       -Dget_crc_table=get_crc_table_boinc -Dlongest_match=longest_match_boinc 
-Dinflate_codes=inflate_codes_boinc
+ZIP_FLAGS = $(BOINC_ZIP_VCPROJ_FLAGS) -DUSE_MINGW_GLOBBING -DUSE_STRM_INPUT 
$(INCS) -O2 $(NOCYGWIN)
 
 # LDFLAGS = -lwinmm 
 
@@ -133,6 +137,11 @@ all-la: $(BIN) $(API_LIB)
 .PHONY: boinc_zip
 boinc_zip: $(ZIP_BIN)
 
+.PHONY: wrapper
+wrapper: wrapper.exe
+wrapper.exe: wrapper.o regexp.o regsub.o regerror.o regexp_memory.o 
regexp_report.o $(API_BIN) $(LIB_BIN) $(ZIP_BIN)
+        $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ -lpsapi
+
 # set to the target tools when cross-compiling
 RANLIB ?= ranlib
 LIBTOOL ?= libtool
@@ -148,8 +157,8 @@ $(LIB_BIN): $(LIB_OBJ)
        $(AR) rc $@ $^
 $(GPH_BIN): $(GPH_OBJ)
        $(AR) rc $@ $^
-$(ZIP_BIN): $(ZIP_OBJ)
-       $(AR) rc $@ $^
+$(ZIP_BIN): zip $(ZIP_OBJ)
+       $(AR) rc $@ $(ZIP_OBJ)
 
 # standard BOINC code - .C and .cpp versions
 %.o: $(BOINC_SRC)/api/%.C
@@ -160,27 +169,37 @@ $(ZIP_BIN): $(ZIP_OBJ)
        $(CXX) -c $< -o $@ $(CPPFLAGS) $(CXXFLAGS)
 %.o: $(BOINC_SRC)/lib/%.cpp
        $(CXX) -c $< -o $@ $(CPPFLAGS) $(CXXFLAGS)
+
+# libtool libboinc_api
 %.lo: $(BOINC_SRC)/api/%.cpp
        $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $< -o $@ $(CPPFLAGS) 
$(CXXFLAGS)
 %.lo: $(BOINC_SRC)/lib/%.cpp
        $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $< -o $@ $(CPPFLAGS) 
$(CXXFLAGS)
 
+# for the wrapper
+wrapper.o: $(BOINC_SRC)/samples/wrapper/wrapper.cpp
+       $(CXX) -c $< -o $@ $(CPPFLAGS) $(CXXFLAGS)
+%.o: $(BOINC_SRC)/samples/wrapper/%.c
+       $(CC) -c $< -o $@ $(CPPFLAGS) $(CFLAGS)
+
 # C-mode file
 md5.o: $(BOINC_SRC)/lib/md5.c
        $(CXX) -c $(BOINC_SRC)/lib/md5.c -o md5.o $(CPPFLAGS) $(CXXFLAGS)
 
 # for boinc_zip. Don't change the order!
-%.o: $(BOINC_SRC)/zip/%.cpp
+zip:
+       mkdir -p $@
+zip/%.o: $(BOINC_SRC)/zip/%.cpp
        $(CXX) -c $< -o $@ $(ZIP_FLAGS)
-%.o: $(BOINC_SRC)/zip/unzip/win32/%.c
+zip/%.o: $(BOINC_SRC)/zip/unzip/win32/%.c
        $(CC) -c $< -o $@ $(ZIP_FLAGS)
-%.o: $(BOINC_SRC)/zip/unzip/%.c
+zip/%.o: $(BOINC_SRC)/zip/unzip/%.c
        $(CC) -c $< -o $@ $(ZIP_FLAGS)
-%.o: $(BOINC_SRC)/zip/zip/win32/%.c
+zip/%.o: $(BOINC_SRC)/zip/zip/win32/%.c
        $(CC) -c $< -o $@ $(ZIP_FLAGS)
-%.o: $(BOINC_SRC)/zip/zip/%.c
+zip/%.o: $(BOINC_SRC)/zip/zip/%.c
        $(CC) -c $< -o $@ $(ZIP_FLAGS)
-z_util.o: $(BOINC_SRC)/zip/zip/util.c
+zip/z_util.o: $(BOINC_SRC)/zip/zip/util.c
        $(CC) -c $< -o $@ $(ZIP_FLAGS)
 
 $(BOINC_SRC)/svn_version.h:
-- 
1.7.2.5

From: Bernd Machenschalk <[email protected]>
Date: Thu, 7 Feb 2013 13:24:38 +0100
Subject: [PATCH 2/2] make LIB_OBJ more readable

---
 lib/Makefile.mingw |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/lib/Makefile.mingw b/lib/Makefile.mingw
index dbc9e44..8a0302b 100644
--- a/lib/Makefile.mingw
+++ b/lib/Makefile.mingw
@@ -47,9 +47,30 @@ OCL_OBJ = boinc_opencl.o
 
 GPH_OBJ = graphics2.o graphics2_util.o
 
-LIB_OBJ = util.o win_util.o app_ipc.o diagnostics.o diagnostics_win.o 
filesys.o \
-       hostinfo.o md5.o md5_file.o mem_usage.o mfile.o miofile.o 
procinfo_win.o procinfo.o proc_control.o parse.o prefs.o \
-       proxy_info.o str_util.o shmem.o base64.o stackwalker_win.o url.o 
coproc.o
+LIB_OBJ = app_ipc.o \
+       base64.o \
+       coproc.o \
+       diagnostics.o \
+       diagnostics_win.o \
+       filesys.o \
+       hostinfo.o \
+       md5.o \
+       md5_file.o \
+       mem_usage.o \
+       mfile.o \
+       miofile.o \
+       procinfo_win.o \
+       procinfo.o \
+       proc_control.o \
+       parse.o \
+       prefs.o \
+       proxy_info.o \
+       str_util.o \
+       shmem.o \
+       stackwalker_win.o \
+       url.o \
+       util.o \
+       win_util.o
 
 ZIP_OBJ = zip/boinc_zip.o \
        zip/api.o \
-- 
1.7.2.5

_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to