Replaced the GNU makefiles with CMake.

This commit is contained in:
Jan Vidar Krey 2012-10-02 15:49:27 +02:00
parent 5b4467acd5
commit 37e78eada1
8 changed files with 192 additions and 413 deletions

1
.gitignore vendored
View File

@ -6,7 +6,6 @@ mod_*.so
uhub-admin
adcrush
uhub
revision.h*
build-stamp
debian/files
debian/uhub.debhelper.log

View File

@ -1,8 +0,0 @@
GMAKE=gmake
all:
@${GMAKE} ${.TARGETS}
${.TARGETS}: all

151
CMakeLists.txt Normal file
View File

@ -0,0 +1,151 @@
##
## Makefile for uhub
## Copyright (C) 2007-2012, Jan Vidar Krey <janvidar@extatic.org>
#
cmake_minimum_required (VERSION 2.6)
project (uhub)
set (UHUB_VERSION_MAJOR 0)
set (UHUB_VERSION_MINOR 4)
set (UHUB_VERSION_PATCH 1)
set (PROJECT_SOURCE_DIR "src")
option(RELEASE "Release build, debug build if disabled" ON)
option(LINK_SUPPORT "Allow hub linking" OFF)
option(SSL_SUPPORT "Enable SSL support" ON)
find_package(Git)
if (SSL_SUPPORT)
find_package(OpenSSL REQUIRED)
endif()
include_directories("${PROJECT_SOURCE_DIR}")
set (network_SOURCES
${PROJECT_SOURCE_DIR}/network/backend.c
${PROJECT_SOURCE_DIR}/network/connection.c
${PROJECT_SOURCE_DIR}/network/epoll.c
${PROJECT_SOURCE_DIR}/network/kqueue.c
${PROJECT_SOURCE_DIR}/network/select.c
${PROJECT_SOURCE_DIR}/network/timeout.c
${PROJECT_SOURCE_DIR}/network/timer.c
${PROJECT_SOURCE_DIR}/network/network.c
${PROJECT_SOURCE_DIR}/util/ipcalc.c
)
set (uhub_SOURCES
${PROJECT_SOURCE_DIR}/core/auth.c
${PROJECT_SOURCE_DIR}/core/command_parser.c
${PROJECT_SOURCE_DIR}/core/commands.c
${PROJECT_SOURCE_DIR}/core/config.c
${PROJECT_SOURCE_DIR}/core/eventqueue.c
${PROJECT_SOURCE_DIR}/core/hub.c
${PROJECT_SOURCE_DIR}/core/hubevent.c
${PROJECT_SOURCE_DIR}/core/inf.c
${PROJECT_SOURCE_DIR}/core/ioqueue.c
${PROJECT_SOURCE_DIR}/core/netevent.c
${PROJECT_SOURCE_DIR}/core/probe.c
${PROJECT_SOURCE_DIR}/core/route.c
${PROJECT_SOURCE_DIR}/core/user.c
${PROJECT_SOURCE_DIR}/core/usermanager.c
${PROJECT_SOURCE_DIR}/core/plugincallback.c
${PROJECT_SOURCE_DIR}/core/plugininvoke.c
${PROJECT_SOURCE_DIR}/core/pluginloader.c
)
set (adc_SOURCES
${PROJECT_SOURCE_DIR}/adc/message.c
${PROJECT_SOURCE_DIR}/adc/sid.c
)
set (utils_SOURCES
${PROJECT_SOURCE_DIR}/util/cbuffer.c
${PROJECT_SOURCE_DIR}/util/config_token.c
${PROJECT_SOURCE_DIR}/util/credentials.c
${PROJECT_SOURCE_DIR}/util/floodctl.c
${PROJECT_SOURCE_DIR}/util/list.c
${PROJECT_SOURCE_DIR}/util/log.c
${PROJECT_SOURCE_DIR}/util/memory.c
${PROJECT_SOURCE_DIR}/util/misc.c
${PROJECT_SOURCE_DIR}/util/rbtree.c
${PROJECT_SOURCE_DIR}/util/tiger.c
)
set (adcclient_SOURCES
${PROJECT_SOURCE_DIR}/tools/adcclient.c
)
add_library(adc STATIC ${adc_SOURCES})
add_library(network STATIC ${network_SOURCES})
add_library(utils STATIC ${utils_SOURCES})
add_library(adcclient STATIC ${adcclient_SOURCES})
add_dependencies(adc utils)
add_dependencies(network utils)
add_executable(uhub ${PROJECT_SOURCE_DIR}/core/main.c ${uhub_SOURCES} )
add_executable(uhub-passwd ${PROJECT_SOURCE_DIR}/tools/uhub-passwd.c ${PROJECT_SOURCE_DIR}/util/misc.c ${PROJECT_SOURCE_DIR}/util/memory.c ${PROJECT_SOURCE_DIR}/util/log.c ${PROJECT_SOURCE_DIR}/util/list.c)
add_executable(uhub-admin ${PROJECT_SOURCE_DIR}/tools/admin.c ${adcclient_SOURCES})
add_library(mod_example MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_example.c ${utils_SOURCES})
add_library(mod_welcome MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_welcome.c ${utils_SOURCES} ${network_SOURCES})
add_library(mod_logging MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_logging.c ${utils_SOURCES} ${PROJECT_SOURCE_DIR}/adc/sid.c ${network_SOURCES})
add_library(mod_auth_simple MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_auth_simple.c ${utils_SOURCES})
add_library(mod_chat_history MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_chat_history.c ${utils_SOURCES})
add_library(mod_chat_only MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_chat_only.c ${utils_SOURCES})
add_library(mod_topic MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_topic.c ${utils_SOURCES})
add_library(mod_auth_sqlite MODULE ${PROJECT_SOURCE_DIR}/plugins/mod_auth_sqlite.c ${utils_SOURCES})
target_link_libraries(mod_auth_sqlite sqlite3)
set_target_properties(
mod_example
mod_welcome
mod_logging
mod_auth_simple
mod_chat_history
mod_chat_only
mod_topic
mod_auth_sqlite
PROPERTIES PREFIX "")
target_link_libraries(uhub ${CMAKE_DL_LIBS} adc network utils)
target_link_libraries(uhub-passwd sqlite3)
target_link_libraries(uhub-admin adcclient adc network utils)
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%h OUTPUT_VARIABLE UHUB_REVISION)
set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-git-${UHUB_REVISION}")
else()
endif()
if(OPENSSL_FOUND)
add_definitions(-DSSL_SUPPORT=1)
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(uhub ${OPENSSL_LIBRARIES})
target_link_libraries(uhub-admin ${OPENSSL_LIBRARIES})
target_link_libraries(mod_welcome ${OPENSSL_LIBRARIES})
target_link_libraries(mod_logging ${OPENSSL_LIBRARIES})
endif()
configure_file ("${PROJECT_SOURCE_DIR}/version.h.in" "${PROJECT_SOURCE_DIR}/version.h")
mark_as_advanced(FORCE CMAKE_BUILD_TYPE)
if (RELEASE)
set(CMAKE_BUILD_TYPE Release)
else()
set(CMAKE_BUILD_TYPE Debug)
endif()

View File

@ -1,378 +0,0 @@
##
## Makefile for uhub (Use GNU make)
## Copyright (C) 2007-2010, Jan Vidar Krey <janvidar@extatic.org>
#
-include Makefile.private
CC = gcc
LD := $(CC)
MV := mv
RANLIB := ranlib
CFLAGS += -pipe -Wall
USE_SSL ?= YES
USE_PLUGINS ?= YES
USE_BIGENDIAN ?= AUTO
BITS ?= AUTO
SILENT ?= YES
TERSE ?= NO
STACK_PROTECT ?= NO
NEED_LIBDL ?= NO
ifeq ($(OS), Windows_NT)
WINDOWS ?= YES
OPSYS ?= Windows
else
OPSYS ?= $(shell uname)
endif
ifeq ($(OPSYS),SunOS)
LDLIBS += -lsocket -lnsl
endif
ifeq ($(OPSYS),Haiku)
LDLIBS += -lnetwork
endif
ifeq ($(OPSYS),Linux)
NEED_LIBDL = YES
endif
CFLAGS += -I./src/
ifeq ($(OPSYS),Windows)
USE_BIGENDIAN := NO
LDLIBS += -lws2_32
UHUB_CONF_DIR ?= c:/uhub/
UHUB_PREFIX ?= c:/uhub/
CFLAGS += -mno-cygwin
LDFLAGS += -mno-cygwin
BIN_EXT ?= .exe
else
DESTDIR ?= /
UHUB_CONF_DIR ?= $(DESTDIR)/etc/uhub
UHUB_PREFIX ?= $(DESTDIR)/usr/local
UHUB_MOD_DIR ?= $(DESTDIR)/var/lib/uhub
CFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
BIN_EXT ?=
endif
ifeq ($(SILENT),YES)
MSG_CC=@echo " CC:" $(notdir $<) &&
MSG_LD=@echo " LD:" $(notdir $@) &&
MSG_AR=@echo " AR:" $(notdir $@) &&
else
MSG_CC=
MSG_LD=
MSG_AR=
endif
ifeq ($(TERSE), YES)
MSG_CC=@
MSG_LD=@
MSG_AR=@
MSG_CLEAN=-n ""
else
MSG_CLEAN="Clean as a whistle"
endif
ifeq ($(RELEASE),YES)
CFLAGS += -O3 -DNDEBUG
else
CFLAGS += -ggdb -DDEBUG
endif
ifeq ($(STACK_PROTECT),YES)
CFLAGS += -fstack-protector-all
endif
ifeq ($(PROFILING),YES)
CFLAGS += -pg
LDFLAGS += -pg
endif
ifeq ($(FUNCTRACE),YES)
CFLAGS += -finstrument-functions
CFLAGS += -DDEBUG_FUNCTION_TRACE
endif
ifneq ($(BITS), AUTO)
ifeq ($(BITS), 64)
CFLAGS += -m64
LDFLAGS += -m64
else
ifeq ($(BITS), 32)
CFLAGS += -m32
LDFLAGS += -m32
endif
endif
endif
ifeq ($(USE_BIGENDIAN),AUTO)
ifeq ($(shell perl -e 'print pack("L", 0x554E4958)'),UNIX)
CFLAGS += -DARCH_BIGENDIAN
endif
else
ifeq ($(USE_BIGENDIAN),YES)
CFLAGS += -DARCH_BIGENDIAN
endif
endif
ifeq ($(USE_SSL),YES)
CFLAGS += -DSSL_SUPPORT
LDLIBS += -lssl -lcrypto
endif
ifeq ($(NEED_LIBDL),YES)
LDLIBS += -ldl
endif
GIT_VERSION=$(shell git describe --tags 2>/dev/null || echo "")
GIT_REVISION=$(shell git show --abbrev-commit 2>/dev/null | head -n 1 | cut -f 2 -d " " || echo "")
OLD_REVISION=$(shell grep GIT_REVISION revision.h 2>/dev/null | cut -f 3 -d " " | tr -d "\"")
# Sources
libuhub_SOURCES := \
src/core/auth.c \
src/core/command_parser.c \
src/core/commands.c \
src/core/config.c \
src/core/eventqueue.c \
src/core/hub.c \
src/core/hubevent.c \
src/core/inf.c \
src/core/ioqueue.c \
src/core/netevent.c \
src/core/probe.c \
src/core/route.c \
src/core/user.c \
src/core/usermanager.c \
src/core/plugincallback.c \
src/core/plugininvoke.c \
src/core/pluginloader.c \
src/network/backend.c \
src/network/connection.c \
src/network/epoll.c \
src/network/kqueue.c \
src/network/select.c \
src/network/timeout.c \
src/network/timer.c
libadc_common_SOURCES := \
src/adc/message.c \
src/adc/sid.c
libutils_SOURCES := \
src/util/cbuffer.c \
src/util/config_token.c \
src/util/credentials.c \
src/util/floodctl.c \
src/util/ipcalc.c \
src/util/list.c \
src/util/log.c \
src/util/memory.c \
src/util/misc.c \
src/network/network.c \
src/util/rbtree.c \
src/util/tiger.c
libadc_client_SOURCES := \
src/tools/adcclient.c
uhub_SOURCES := src/core/main.c
uhub-passwd_SOURCES := src/tools/uhub-passwd.c
uhub-passwd_LIBS := -lsqlite3
adcrush_SOURCES := src/tools/adcrush.c
admin_SOURCES := src/tools/admin.c
autotest_SOURCES := \
autotest/test_commands.tcc \
autotest/test_credentials.tcc \
autotest/test_eventqueue.tcc \
autotest/test_hub.tcc \
autotest/test_inf.tcc \
autotest/test_ipfilter.tcc \
autotest/test_list.tcc \
autotest/test_memory.tcc \
autotest/test_message.tcc \
autotest/test_misc.tcc \
autotest/test_sid.tcc \
autotest/test_tiger.tcc \
autotest/test_timer.tcc \
autotest/test_tokenizer.tcc \
autotest/test_usermanager.tcc
autotest_OBJECTS = autotest.o
# Plugin targets:
plugin_example_SOURCES := src/plugins/mod_example.c
plugin_example_TARGET := mod_example.so
plugin_welcome_SOURCES := src/plugins/mod_welcome.c
plugin_welcome_TARGET := mod_welcome.so
plugin_logging_SOURCES := src/plugins/mod_logging.c
plugin_logging_TARGET := mod_logging.so
plugin_auth_SOURCES := src/plugins/mod_auth_simple.c
plugin_auth_TARGET := mod_auth_simple.so
plugin_auth_sqlite_SOURCES := src/plugins/mod_auth_sqlite.c
plugin_auth_sqlite_TARGET := mod_auth_sqlite.so
plugin_auth_sqlite_LIBS := -lsqlite3
plugin_chat_history_SOURCES := src/plugins/mod_chat_history.c
plugin_chat_history_TARGET := mod_chat_history.so
plugin_chat_only_SOURCES := src/plugins/mod_chat_only.c
plugin_chat_only_TARGET := mod_chat_only.so
plugin_topic_SOURCES := src/plugins/mod_topic.c
plugin_topic_TARGET := mod_topic.so
# Source to objects
libuhub_OBJECTS := $(libuhub_SOURCES:.c=.o)
libutils_OBJECTS := $(libutils_SOURCES:.c=.o)
libadc_client_OBJECTS := $(libadc_client_SOURCES:.c=.o)
libadc_common_OBJECTS := $(libadc_common_SOURCES:.c=.o)
uhub_OBJECTS := $(uhub_SOURCES:.c=.o)
uhub-passwd_OBJECTS := $(uhub-passwd_SOURCES:.c=.o)
adcrush_OBJECTS := $(adcrush_SOURCES:.c=.o)
admin_OBJECTS := $(admin_SOURCES:.c=.o)
all_plugins := \
$(plugin_example_TARGET) \
$(plugin_logging_TARGET) \
$(plugin_auth_TARGET) \
$(plugin_auth_sqlite_TARGET) \
$(plugin_welcome_TARGET) \
$(plugin_chat_history_TARGET) \
$(plugin_chat_only_TARGET) \
$(plugin_topic_TARGET)
all_OBJECTS := \
$(libuhub_OBJECTS) \
$(uhub_OBJECTS) \
$(libutils_OBJECTS) \
$(adcrush_OBJECTS) \
$(autotest_OBJECTS) \
$(admin_OBJECTS) \
$(libadc_common_OBJECTS) \
$(libadc_client_OBJECTS)
all_OBJECTS += $(all_plugins)
uhub_BINARY=uhub$(BIN_EXT)
uhub-passwd_BINARY=uhub-passwd$(BIN_EXT)
adcrush_BINARY=adcrush$(BIN_EXT)
admin_BINARY=uhub-admin$(BIN_EXT)
autotest_BINARY=autotest/test$(BIN_EXT)
.PHONY: revision.h.tmp all plugins
%.o: %.c version.h revision.h
$(MSG_CC) $(CC) -fPIC -c $(CFLAGS) -o $@ $<
#%.so: %.c
# $(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
all: $(uhub_BINARY) $(uhub-passwd_BINARY) plugins
plugins: $(uhub_BINARY) $(all_plugins)
$(plugin_auth_TARGET): $(plugin_auth_SOURCES) $(libutils_OBJECTS)
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
$(plugin_auth_sqlite_TARGET): $(plugin_auth_sqlite_SOURCES) $(libutils_OBJECTS)
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS) $(LDFLAGS) $(plugin_auth_sqlite_LIBS)
$(plugin_example_TARGET): $(plugin_example_SOURCES) $(libutils_OBJECTS)
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
$(plugin_logging_TARGET): $(plugin_logging_SOURCES) $(libutils_OBJECTS) $(libadc_common_OBJECTS) src/network/network.o
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
$(plugin_chat_history_TARGET): $(plugin_chat_history_SOURCES) $(libutils_OBJECTS)
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
$(plugin_chat_only_TARGET): $(plugin_chat_only_SOURCES) $(libutils_OBJECTS)
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
$(plugin_welcome_TARGET): $(plugin_welcome_SOURCES) $(libutils_OBJECTS)
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
$(plugin_topic_TARGET): $(plugin_topic_SOURCES) $(libutils_OBJECTS)
$(MSG_CC) $(CC) -shared -fPIC -o $@ $^ $(CFLAGS)
$(adcrush_BINARY): $(adcrush_OBJECTS) $(libuhub_OBJECTS) $(libutils_OBJECTS) $(libadc_common_OBJECTS) $(libadc_client_OBJECTS)
$(MSG_LD) $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
$(admin_BINARY): $(admin_OBJECTS) $(libuhub_OBJECTS) $(libutils_OBJECTS) $(libadc_common_OBJECTS) $(libadc_client_OBJECTS)
$(MSG_LD) $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
$(uhub_BINARY): $(uhub_OBJECTS) $(libuhub_OBJECTS) $(libutils_OBJECTS) $(libadc_common_OBJECTS)
$(MSG_LD) $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
$(uhub-passwd_BINARY): $(uhub-passwd_OBJECTS) src/util/misc.o src/util/list.o src/util/memory.o src/util/log.o
$(MSG_LD) $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(uhub-passwd_LIBS)
autotest.c: $(autotest_SOURCES)
$(shell exotic --standalone $(autotest_SOURCES) > $@)
revision.h.tmp:
@rm -f $@
@echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@
@if [ -n '$(GIT_VERSION)' ]; then echo \#define GIT_VERSION \"$(GIT_VERSION)\" >> $@; fi
@if [ -n '$(GIT_REVISION)' ]; then echo \#define GIT_REVISION \"$(GIT_REVISION)\" >> $@; fi
version.h: revision.h
revision.h: revision.h.tmp
@if [ '$(GIT_REVISION)' != '$(OLD_REVISION)' ]; then cp $@.tmp $@; fi
@if [ ! -f $@ ]; then cp $@.tmp $@; fi
$(autotest_OBJECTS): autotest.c
$(MSG_CC) $(CC) -c $(CFLAGS) -Isrc -o $@ $<
$(autotest_BINARY): $(autotest_OBJECTS) $(libuhub_OBJECTS) $(libutils_OBJECTS) $(libadc_common_OBJECTS) $(libadc_client_OBJECTS)
$(MSG_LD) $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
autotest: $(autotest_BINARY)
@./$(autotest_BINARY) -s -f
ifeq ($(WINDOWS),YES)
install:
@echo "Cannot install automatically on windows."
else
install: all
@echo Copying $(uhub_BINARY) to $(UHUB_PREFIX)/bin/
@cp $(uhub_BINARY) $(UHUB_PREFIX)/bin/
@cp $(uhub-passwd_BINARY) $(UHUB_PREFIX)/bin/
@if [ ! -d $(UHUB_CONF_DIR) ]; then echo Creating $(UHUB_CONF_DIR); mkdir -p $(UHUB_CONF_DIR); fi
@if [ ! -f $(UHUB_CONF_DIR)/uhub.conf ]; then cp doc/uhub.conf $(UHUB_CONF_DIR); fi
@if [ ! -f $(UHUB_CONF_DIR)/rules.txt ]; then cp doc/rules.txt $(UHUB_CONF_DIR); fi
@if [ ! -f $(UHUB_CONF_DIR)/plugins.conf ]; then cp doc/plugins.conf $(UHUB_CONF_DIR); fi
@if [ ! -d $(UHUB_MOD_DIR) ]; then echo Creating $(UHUB_MOD_DIR); mkdir -p $(UHUB_MOD_DIR); fi
@cp -f mod_*.so $(UHUB_MOD_DIR)
@touch $(UHUB_CONF_DIR)/motd.txt
@echo done.
endif
dist-clean:
@rm -rf $(all_OBJECTS) *~ core
clean:
@rm -rf $(libuhub_OBJECTS) *~ core $(uhub_BINARY) $(uhub-passwd_BINARY) $(admin_BINARY) $(autotest_BINARY) $(adcrush_BINARY) $(all_OBJECTS) $(all_plugins) autotest.c revision.h revision.h.tmp && \
echo $(MSG_CLEAN)

View File

@ -1,6 +1,6 @@
/*
* uhub - A tiny ADC p2p connection hub
* Copyright (C) 2007-2009, Jan Vidar Krey
* Copyright (C) 2007-2012, Jan Vidar Krey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -103,7 +103,7 @@
#include <openssl/err.h>
#endif
#include "../version.h"
#include "version.h"
#define uhub_assert assert

View File

@ -1,6 +1,6 @@
/*
* uhub - A tiny ADC p2p connection hub
* Copyright (C) 2007-2010, Jan Vidar Krey
* Copyright (C) 2007-2012, Jan Vidar Krey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

38
src/version.h.in Normal file
View File

@ -0,0 +1,38 @@
/*
* uhub - A tiny ADC p2p connection hub
* Copyright (C) 2007-2012, Jan Vidar Krey
*
* This program 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 program 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/>.
*
*/
/* THIS FILE IS AUTO-GENERATED BY CMAKE - DO NOT EDIT MANUALLY! */
#ifndef VERSION
#define VERSION "@UHUB_VERSION_MAJOR@.@UHUB_VERSION_MINOR@.@UHUB_VERSION_PATCH@"
#endif
#define GIT_REVISION "@UHUB_REVISION@"
#define GIT_VERSION "@UHUB_GIT_VERSION@"
#ifndef PRODUCT
#define PRODUCT "uhub"
#endif
#define REVISION GIT_REVISION
#define PRODUCT_STRING PRODUCT "/" GIT_VERSION
#ifndef COPYRIGHT
#define COPYRIGHT "Copyright (c) 2007-2012, Jan Vidar Krey <janvidar@extatic.org>"
#endif

View File

@ -1,23 +0,0 @@
#if !defined(_MSC_VER)
#include "revision.h"
#endif
#ifndef PRODUCT
#define PRODUCT "uhub"
#endif
#ifndef VERSION
#define VERSION "0.4.0"
#endif
#ifndef GIT_REVISION
#define REVISION ""
#define PRODUCT_STRING PRODUCT "/" VERSION
#else
#define REVISION "git-" GIT_REVISION
#define PRODUCT_STRING PRODUCT "/" VERSION "-" REVISION
#endif
#ifndef COPYRIGHT
#define COPYRIGHT "Copyright (c) 2007-2012, Jan Vidar Krey <janvidar@extatic.org>"
#endif