Skip to content

Commit

Permalink
zproject based build
Browse files Browse the repository at this point in the history
  • Loading branch information
twhittock committed Feb 12, 2015
1 parent d4d693c commit 5ea2e81
Show file tree
Hide file tree
Showing 38 changed files with 880 additions and 486 deletions.
47 changes: 24 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

########################################################################
# Project setup
Expand All @@ -14,16 +14,11 @@ enable_testing()
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})

#######################################################################
# Do we build and register self tests ?
######################################################################
set(CZMQ_BUILD_TESTS true CACHE BOOL "build czmq selftest")

########################################################################
# determine version
########################################################################
foreach(which MAJOR MINOR PATCH)
file(STRINGS "${SOURCE_DIR}/include/czmq.h" CZMQ_VERSION_STRING REGEX "#define CZMQ_VERSION_${which}")
file(STRINGS "${SOURCE_DIR}/include/czmq_library.h" CZMQ_VERSION_STRING REGEX "#define CZMQ_VERSION_${which}")
string(REGEX MATCH "#define CZMQ_VERSION_${which} ([0-9_]+)" CZMQ_REGEX_MATCH "${CZMQ_VERSION_STRING}")
if (NOT CZMQ_REGEX_MATCH)
message(FATAL_ERROR "failed to parse CZMQ_VERSION_${which} from czmq.h")
Expand Down Expand Up @@ -74,18 +69,27 @@ if (MINGW)
set(MORE_LIBRARIES -lws2_32 -lrpcrt4 -liphlpapi)
endif()

# required libraries for cygwin
if (CYGWIN)
set(MORE_LIBRARIES -luuid)
endif()

list(APPEND CMAKE_MODULE_PATH ${SOURCE_DIR})

########################################################################
# ZeroMQ depedency
# ZMQ dependency
########################################################################
list(APPEND CMAKE_MODULE_PATH ${SOURCE_DIR})
find_package(ZeroMQ REQUIRED)
include_directories(${ZEROMQ_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${ZEROMQ_LIBRARIES})

########################################################################
# includes
########################################################################
set (czmq_headers
include/czmq.h
include/czmq_library.h
include/czmq_prelude.h
include/czmq.h
include/zactor.h
include/zauth.h
include/zarmour.h
Expand Down Expand Up @@ -139,7 +143,6 @@ install(FILES ${czmq_headers} DESTINATION include)
########################################################################
include_directories(${BINARY_DIR})
include_directories(${SOURCE_DIR}/include)
include_directories(${ZEROMQ_INCLUDE_DIRS})
set (czmq_sources
src/zactor.c
src/zauth.c
Expand Down Expand Up @@ -215,19 +218,17 @@ install(
########################################################################
# tests
########################################################################
if (CZMQ_BUILD_TESTS)
add_executable(czmq_selftest ${SOURCE_DIR}/src/czmq_selftest.c)
target_link_libraries(czmq_selftest czmq ${ZEROMQ_LIBRARIES})
add_test(czmq_selftest czmq_selftest)
endif()
add_executable(czmq_selftest ${SOURCE_DIR}/src/czmq_selftest.c)
target_link_libraries(czmq_selftest czmq ${ZEROMQ_LIBRARIES})
add_test(czmq_selftest czmq_selftest)

########################################################################
# summary
########################################################################
message(STATUS "version: ${CZMQ_VERSION}")
message(STATUS "install: ${CMAKE_INSTALL_PREFIX}")

#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
151 changes: 20 additions & 131 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,145 +1,34 @@
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

ACLOCAL_AMFLAGS = -I config

AM_CPPFLAGS = \
${zmq_CFLAGS} \
-I$(srcdir)/include
${zmq_CFLAGS} \
-I$(srcdir)/include

SUBDIRS = doc
project_libs = \
${zmq_LIBS}

DIST_SUBDIRS = doc
SUBDIRS =
SUBDIRS += doc

DIST_SUBDIRS =
lib_LTLIBRARIES =

bin_PROGRAMS =

check_PROGRAMS =

EXTRA_DIST = \
version.sh \
builds/android/Android.mk \
builds/android/Application.mk \
builds/android/build.sh \
builds/android/clean.sh \
builds/mingw32/Makefile.mingw32 \
builds/mingw32/platform.h \
builds/cygwin/Makefile.cygwin \
examples/security/grasslands.c \
examples/security/strawhouse.c \
examples/security/woodhouse.c \
examples/security/stonehouse.c \
examples/security/ironhouse.c \
examples/security/ironhouse2.c \
examples/security/README.txt \
examples/security/LICENSE \
foreign/slre/readme.txt \
foreign/slre/slre.h \
foreign/slre/slre.c \
foreign/sha1/sha1.c \
foreign/sha1/sha1.h \
packaging/dist/gitlog2changelog.py \
packaging/nuget/package.config \
packaging/nuget/package.targets \
packaging/nuget/package.bat \
packaging/nuget/package.gsl \
packaging/nuget/package.xml \
packaging/nuget/package.nuspec \
builds/msvc/build/buildbase.bat \
builds/msvc/build/buildall.bat \
builds/msvc/vs2012/czmq.sln \
builds/msvc/vs2012/czmq_selftest/czmq_selftest.props \
builds/msvc/vs2012/czmq_selftest/czmq_selftest.vcxproj \
builds/msvc/vs2012/czmq/czmq.props \
builds/msvc/vs2012/czmq/czmq.vcxproj \
builds/msvc/vs2012/czmq/czmq.vcxproj.filters \
builds/msvc/vs2012/.gitignore \
builds/msvc/vs2012/libzmq.import.props \
builds/msvc/vs2012/libzmq.import.xml \
builds/msvc/vs2012/czmq.import.props \
builds/msvc/vs2012/czmq.import.xml \
builds/msvc/vs2012/libsodium.import.props \
builds/msvc/vs2012/libsodium.import.xml \
builds/msvc/vs2008/README.txt \
builds/msvc/vs2008/czmq.sln \
builds/msvc/vs2008/czmq_selftest/czmq_selftest.vcproj \
builds/msvc/vs2008/czmq/czmq.vcproj \
builds/msvc/.gitignore \
builds/msvc/vs2010/czmq.sln \
builds/msvc/vs2010/czmq_selftest/czmq_selftest.props \
builds/msvc/vs2010/czmq_selftest/czmq_selftest.vcxproj \
builds/msvc/vs2010/czmq/czmq.props \
builds/msvc/vs2010/czmq/czmq.vcxproj \
builds/msvc/vs2010/czmq/czmq.vcxproj.filters \
builds/msvc/vs2010/.gitignore \
builds/msvc/vs2010/libzmq.import.props \
builds/msvc/vs2010/libzmq.import.xml \
builds/msvc/vs2010/czmq.import.props \
builds/msvc/vs2010/czmq.import.xml \
builds/msvc/vs2010/libsodium.import.props \
builds/msvc/vs2010/libsodium.import.xml \
builds/msvc/platform.h \
builds/msvc/vs2013/czmq.sln \
builds/msvc/vs2013/czmq_selftest/czmq_selftest.props \
builds/msvc/vs2013/czmq_selftest/czmq_selftest.vcxproj \
builds/msvc/vs2013/czmq/czmq.props \
builds/msvc/vs2013/czmq/czmq.vcxproj \
builds/msvc/vs2013/czmq/czmq.vcxproj.filters \
builds/msvc/vs2013/libzmq.import.props \
builds/msvc/vs2013/libzmq.import.xml \
builds/msvc/vs2013/czmq.import.props \
builds/msvc/vs2013/czmq.import.xml \
builds/msvc/vs2013/libsodium.import.props \
builds/msvc/vs2013/libsodium.import.xml \
builds/msvc/resource.h \
builds/msvc/czmq.rc \
builds/msvc/properties/ReleaseLIB.props \
builds/msvc/properties/Debug.props \
builds/msvc/properties/LIB.props \
builds/msvc/properties/ReleaseDLL.props \
builds/msvc/properties/LTCG.props \
builds/msvc/properties/Link.props \
builds/msvc/properties/DebugLTCG.props \
builds/msvc/properties/ReleaseLTCG.props \
builds/msvc/properties/x64.props \
builds/msvc/properties/Messages.props \
builds/msvc/properties/DebugDEXE.props \
builds/msvc/properties/Release.props \
builds/msvc/properties/Win32.props \
builds/msvc/properties/DLL.props \
builds/msvc/properties/ReleaseSEXE.props \
builds/msvc/properties/DebugSEXE.props \
builds/msvc/properties/EXE.props \
builds/msvc/properties/ReleaseDEXE.props \
builds/msvc/properties/DebugLIB.props \
builds/msvc/properties/Common.props \
builds/msvc/properties/DebugDLL.props \
builds/msvc/properties/ReleaseLEXE.props \
builds/msvc/properties/DebugLEXE.props \
builds/msvc/properties/Output.props

include $(srcdir)/model/Makemodule.am
zgossip_engine.inc \
zhash_primes.inc \
zclass_example.xml \
version.sh

include $(srcdir)/src/Makemodule.am

include $(srcdir)/addons/Makemodule.am

# workaround the dist generated files that are also part of the distribution
#distcleancheck_listfiles = \
# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
# Note that distcleancheck is disabled for now, while waiting for a proper
# solution, that do not break older unix systems
distcleancheck:
@:

# Automatically generate the ChangeLog from Git logs:
MAINTAINERCLEAN_FILES = ChangeLog
# Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
# in case it has already been generated previously
#
# Older boundary of the ChangeLog commits range
# It can be a tag ('v2.2.0'), a commit hash, a date, ...
# See gitrevisions for more information on specifying ranges
GIT_START_POINT=v2.2.0
dummy-stamp:
ChangeLog: packaging/dist/gitlog2changelog.py dummy-stamp
$(top_srcdir)/packaging/dist/gitlog2changelog.py $(GIT_START_POINT) || \
echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/zeromq/czmq/commits/master" > $@
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
30 changes: 10 additions & 20 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
#!/bin/sh
#
# Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
# Copyright other contributors as noted in the AUTHORS file.
#
# This file is part of CZMQ, the high-level C binding for 0MQ:
# http://czmq.zeromq.org.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#!/usr/bin/env sh
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

# Script to generate all required files from fresh git checkout.

Expand Down Expand Up @@ -50,3 +35,8 @@ if [ $? -ne 0 ]; then
echo "autogen.sh: error: autoreconf exited with status $?" 1>&2
exit 1
fi

################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
16 changes: 8 additions & 8 deletions builds/android/Android.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

BASE_PATH := $(call my-dir)
APP_PLATFORM = android-10
Expand All @@ -24,7 +24,7 @@ LOCAL_SRC_FILES := zactor.c zauth.c zarmour.c zbeacon.c zcert.c zcertstore.c zch
LOCAL_SHARED_LIBRARIES := zmq
include $(BUILD_SHARED_LIBRARY)

#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
21 changes: 10 additions & 11 deletions builds/cygwin/Makefile.cygwin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

CC=gcc
# replace the following with wherever you have installed libzmq
Expand All @@ -14,19 +14,18 @@ OBJS = zactor.o zauth.o zarmour.o zbeacon.o zcert.o zcertstore.o zchunk.o zclock
%.o: ../../src/%.c
$(CC) -c -o $@ $< $(CFLAGS)

all: libczmq.dll # czmq_selftest.exe
all: libczmq.dll czmq_selftest.exe

libczmq.dll: $(OBJS)
$(CC) -shared -o $@ $(OBJS) -Wl,--out-implib,$@.a $(LIBDIR) -lzmq -luuid
$(CC) -shared -o $@ $(OBJS) -Wl,--out-implib,$@.a $(LIBDIR) -lzmq -luuid

# the test functions are not exported into the DLL
czmq_selftest.exe: czmq_selftest.o $(OBJS)
$(CC) -o $@ $^ $(LIBDIR) -lzmq -luuid

clean:
del *.o *.a *.dll *.exe

#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
16 changes: 8 additions & 8 deletions builds/mingw32/Makefile.mingw32
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

CC=gcc
# replace the following with wherever you have installed libzmq
Expand All @@ -26,7 +26,7 @@ czmq_selftest.exe: czmq_selftest.o $(OBJS)
clean:
del *.o *.a *.dll *.exe

#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please read the README.txt file in the model directory. #
#################################################################
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
Loading

0 comments on commit 5ea2e81

Please sign in to comment.