1
0
Fork 0
mirror of https://github.com/HackHerz/pusher synced 2025-12-06 02:10:19 +00:00

Got rid of CMake

This commit is contained in:
Daniel Stein 2015-01-26 17:59:13 +01:00
parent 848972aef8
commit 844bd54386
3 changed files with 67 additions and 316 deletions

View file

@ -1,32 +0,0 @@
cmake_minimum_required(VERSION 2.8)
project(pusher CXX)
# C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_executable(pusher src/main.cpp
src/pushhandler.cpp
src/json/json.cc
src/simpleini/ConvertUTF.c)
# Libraries
target_link_libraries(pusher curl)
# Install
INSTALL_TARGETS("/bin" pusher)
# Debian package
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_NAME "pusher")
set(CPACK_PACKAGE_VERSION "0.3")
set(CPACK_DEBIAN_PACKAGE_VERSION "0.3")
execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcurl3 (>= 7.37.1), libstdc++6 (>= 4.9.1), libgcc1 (1:4.9.1)")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Daniel Stein <d.stein@hackherz.com>")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "push it to the limits.")
set(CPACK_DEBIAN_PACKAGE_SECTION "util")
include(CPack)

284
Makefile
View file

@ -1,284 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/hackherz/Dokumente/GitHub/pusher
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/hackherz/Dokumente/GitHub/pusher
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
/usr/bin/cmake -i .
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
# Special rule for the target install/local
install/local/fast: install/local
.PHONY : install/local/fast
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: install/strip
.PHONY : install/strip/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# Special rule for the target package
package: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..."
/usr/bin/cpack --config ./CPackConfig.cmake
.PHONY : package
# Special rule for the target package
package/fast: package
.PHONY : package/fast
# Special rule for the target package_source
package_source:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..."
/usr/bin/cpack --config ./CPackSourceConfig.cmake /home/hackherz/Dokumente/GitHub/pusher/CPackSourceConfig.cmake
.PHONY : package_source
# Special rule for the target package_source
package_source/fast: package_source
.PHONY : package_source/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/hackherz/Dokumente/GitHub/pusher/CMakeFiles /home/hackherz/Dokumente/GitHub/pusher/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/hackherz/Dokumente/GitHub/pusher/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named pusher
# Build rule for target.
pusher: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 pusher
.PHONY : pusher
# fast build rule for target.
pusher/fast:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/build
.PHONY : pusher/fast
src/json/json.o: src/json/json.cc.o
.PHONY : src/json/json.o
# target to build an object file
src/json/json.cc.o:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/json/json.cc.o
.PHONY : src/json/json.cc.o
src/json/json.i: src/json/json.cc.i
.PHONY : src/json/json.i
# target to preprocess a source file
src/json/json.cc.i:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/json/json.cc.i
.PHONY : src/json/json.cc.i
src/json/json.s: src/json/json.cc.s
.PHONY : src/json/json.s
# target to generate assembly for a file
src/json/json.cc.s:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/json/json.cc.s
.PHONY : src/json/json.cc.s
src/main.o: src/main.cpp.o
.PHONY : src/main.o
# target to build an object file
src/main.cpp.o:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/main.cpp.o
.PHONY : src/main.cpp.o
src/main.i: src/main.cpp.i
.PHONY : src/main.i
# target to preprocess a source file
src/main.cpp.i:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/main.cpp.i
.PHONY : src/main.cpp.i
src/main.s: src/main.cpp.s
.PHONY : src/main.s
# target to generate assembly for a file
src/main.cpp.s:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/main.cpp.s
.PHONY : src/main.cpp.s
src/pushhandler.o: src/pushhandler.cpp.o
.PHONY : src/pushhandler.o
# target to build an object file
src/pushhandler.cpp.o:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/pushhandler.cpp.o
.PHONY : src/pushhandler.cpp.o
src/pushhandler.i: src/pushhandler.cpp.i
.PHONY : src/pushhandler.i
# target to preprocess a source file
src/pushhandler.cpp.i:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/pushhandler.cpp.i
.PHONY : src/pushhandler.cpp.i
src/pushhandler.s: src/pushhandler.cpp.s
.PHONY : src/pushhandler.s
# target to generate assembly for a file
src/pushhandler.cpp.s:
$(MAKE) -f CMakeFiles/pusher.dir/build.make CMakeFiles/pusher.dir/src/pushhandler.cpp.s
.PHONY : src/pushhandler.cpp.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... install"
@echo "... install/local"
@echo "... install/strip"
@echo "... list_install_components"
@echo "... package"
@echo "... package_source"
@echo "... pusher"
@echo "... rebuild_cache"
@echo "... src/json/json.o"
@echo "... src/json/json.i"
@echo "... src/json/json.s"
@echo "... src/main.o"
@echo "... src/main.i"
@echo "... src/main.s"
@echo "... src/pushhandler.o"
@echo "... src/pushhandler.i"
@echo "... src/pushhandler.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

67
makefile Normal file
View file

@ -0,0 +1,67 @@
#=============================================================================
# Set variables for the build
TARGET = pusher
INSTALL_DIR = /usr/local/bin
CXX = g++
CPPFLAGS = -std=c++11
BUILDCOMMAND = $(CXX) $(CPPFLAGS)
LIBS = -lcurl
#=============================================================================
# Build
all: pusher
pusher: json simpleini pushhandler main
$(BUILDCOMMAND) src/json/json.o src/simpleini/ConvertUTF.o src/pushhandler.o src/main.o $(LIBS) -o $(TARGET)
# json library
.PHONY: json
json: src/json/json.o
src/json/json.o: src/json/json.cc
$(BUILDCOMMAND) -c src/json/json.cc -o src/json/json.o
# simpleini
.PHONY: simpleini
simpleini: src/simpleini/ConvertUTF.o
src/simpleini/ConvertUTF.o: src/simpleini/ConvertUTF.c
$(BUILDCOMMAND) -c src/simpleini/ConvertUTF.c -o src/simpleini/ConvertUTF.o
# pushhandler
.PHONY: pushhandler
pushhandler: src/pushhandler.o
src/pushhandler.o: src/pushhandler.cpp
$(BUILDCOMMAND) -c src/pushhandler.cpp -o src/pushhandler.o
# main
.PHONY: main
main: src/main.o
src/main.o: src/main.cpp
$(BUILDCOMMAND) -c src/main.cpp -o src/main.o
#=============================================================================
# Other targets
.PHONY: clean
clean:
rm -f src/*.o
rm -f src/json/*.o
rm -f src/simpleini/*.o
rm -f $(TARGET)
install: pusher
cp $(TARGET) $(INSTALL_DIR)/
.PHONY: remove
remove:
rm -f $(INSTALL_DIR)/$(TARGET)