Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vi catkin #6

Open
wants to merge 11 commits into
base: libbot-openhumanoids
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ bot2-procman/python/src/bot_procman/build_prefix.py
pod-build
bot2-lcmgl/python/src/bot_lcmgl/__init__.py
bot2-procman/python/src/bot_procman/__init__.py
bot2-procman/python/src/bot_procman/*_t.py
74 changes: 37 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
# Default pod makefile distributed with pods version: 12.11.14

# support only a few flags that might be passed through:
# BUILD_PREFIX, BUILD_TYPE, CMAKE_FLAGS*
CMAKE_FLAGS+=$(strip $(CMAKE_FLAGS1) $(CMAKE_FLAGS2) $(CMAKE_FLAGS3) $(CMAKE_FLAGS4) $(CMAKE_FLAGS5) $(CMAKE_FLAGS6) $(CMAKE_FLAGS7) $(CMAKE_FLAGS8) $(CMAKE_FLAGS9) $(CMAKE_FLAGS10) $(CMAKE_FLAGS11) $(CMAKE_FLAGS12) $(CMAKE_FLAGS13) $(CMAKE_FLAGS14) $(CMAKE_FLAGS15) $(CMAKE_FLAGS16) $(CMAKE_FLAGS17) $(CMAKE_FLAGS18) $(CMAKE_FLAGS19) $(CMAKE_FLAGS20))
ifneq "$(BUILD_PREFIX)" ""
CMAKE_FLAGS+=-DCMAKE_INSTALL_PREFIX="$(BUILD_PREFIX)"
default_target: all

# Default to a less-verbose build. If you want all the gory compiler output,
# run "make VERBOSE=1"
$(VERBOSE).SILENT:

# Figure out where to build the software.
# Use BUILD_PREFIX if it was passed in.
# If not, search up to four parent directories for a 'build' directory.
# Otherwise, use ./build.
ifeq "$(BUILD_PREFIX)" ""
BUILD_PREFIX:=$(shell for pfx in ./ .. ../.. ../../.. ../../../..; do d=`pwd`/$$pfx/build;\
if [ -d $$d ]; then echo $$d; exit 0; fi; done; echo `pwd`/build)
endif
# create the build directory if needed, and normalize its path name
BUILD_PREFIX:=$(shell mkdir -p $(BUILD_PREFIX) && cd $(BUILD_PREFIX) && echo `pwd`)

# Default to a release build. If you want to enable debugging flags, run
# "make BUILD_TYPE=Debug"
ifeq "$(BUILD_TYPE)" ""
BUILD_TYPE="Release"
BUILD_TYPE="Release"
endif
CMAKE_FLAGS+=-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
CMAKE_CONFIG=--config $(BUILD_TYPE)

.PHONY: all
all: configure
cmake --build pod-build $(CMAKE_CONFIG) --target all
all: pod-build/Makefile
$(MAKE) -C pod-build all install

pod-build:
cmake -E make_directory pod-build
pod-build/Makefile:
$(MAKE) configure

.PHONY: configure
configure: pod-build
@echo Configuring with CMAKE_FLAGS: $(CMAKE_FLAGS)
@cd pod-build && cmake $(CMAKE_FLAGS) ..

.PHONY: options
options: configure
ifeq ($(OS),Windows_NT)
cmake-gui pod-build
else
ccmake pod-build
endif
configure:
@echo "\nBUILD_PREFIX: $(BUILD_PREFIX)\n\n"

.PHONY: clean
clean:
cmake --build pod-build --target clean
cmake -E remove_directory pod-build
cmake -E remove_directory build
# create the temporary build directory if needed
@mkdir -p pod-build

# other (custom) targets are passed through to the cmake-generated Makefile
%::
cmake --build pod-build $(CMAKE_CONFIG) --target $@

# Default to a less-verbose build. If you want all the gory compiler output,
# run "make VERBOSE=1"
$(VERBOSE).SILENT:
# run CMake to generate and configure the build scripts
@cd pod-build && cmake -DCMAKE_INSTALL_PREFIX=$(BUILD_PREFIX) \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ..

clean:
-if [ -e pod-build/install_manifest.txt ]; then rm -f `cat pod-build/install_manifest.txt`; fi
-if [ -d pod-build ]; then $(MAKE) -C pod-build clean; rm -rf pod-build; fi

### rules specific to this project (everything above is the generic pods makefile wrapper of a cmake project)
# other (custom) targets are passed through to the cmake-generated Makefile
%::
$(MAKE) -C pod-build $@
11 changes: 11 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ Requirements
the Pods core policy. If no other "build" directory is found, it will default to:
libbot2/build/

Catkin
======
libbot now supports catkin.

Please add/remove any/all lcm types, executables and libraries to respective the catkin cmake files (catkin/...).

To build:
1. Clone the code into a catkin workspace (catkin_tools environmnet is recommended).
2. Use rosdep to install dependencies (see https://bitbucket.org/vivan/lcm_catkin for catkin-compatible lcm)
2. Compile the workspace: 'catkin build -s' or 'catkin_make' (depending on which tools you use).

Uninstallation
==============

Expand Down
4 changes: 0 additions & 4 deletions bot2-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ set(POD_NAME bot2-core)

include(cmake/pods.cmake)

#include(cmake/lcmtypes.cmake)
#lcmtypes_build(C_AGGREGATE_HEADER bot_core.h CPP_AGGREGATE_HEADER bot_core.hpp)

add_subdirectory(src/bot_core)
#add_subdirectory(java)
2 changes: 1 addition & 1 deletion bot2-core/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default pod makefile distributed with pods version: 12.09.21
# Default pod makefile distributed with pods version: 12.11.14

default_target: all

Expand Down
Loading