File: Makefile

package info (click to toggle)
libcxx-serial 1.2.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 884 kB
  • sloc: cpp: 3,120; makefile: 75; xml: 17; ansic: 17; python: 9
file content (62 lines) | stat: -rw-r--r-- 1,480 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
all: serial

CMAKE_FLAGS := -DCMAKE_INSTALL_PREFIX=/tmp/usr/local
UNAME := $(shell uname -s)

install_deps:
ifeq ($(UNAME),Darwin)
	brew tap ros/deps
	brew update
	brew outdated boost || brew upgrade boost || brew install boost
	sudo pip install rosinstall_generator wstool rosdep empy catkin_pkg
	sudo rosdep init
	rosdep update
	mkdir catkin_ws
	cd catkin_ws && rosinstall_generator catkin --rosdistro hydro --tar > catkin.rosinstall
	cd catkin_ws && wstool init src catkin.rosinstall
	cd catkin_ws && rosdep install --from-paths src --ignore-src -y
	cd catkin_ws && ./src/catkin/bin/catkin_make install
	echo "source catkin_ws/install/setup.bash" > setup.bash
else
	sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
	wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
	sudo apt-get update
	sudo apt-get install ros-hydro-catkin libboost-dev
	echo "source /opt/ros/hydro/setup.bash" > setup.bash
endif

install:
	cd build && make install

uninstall:
	cd build && make uninstall

serial:
	@mkdir -p build
	cd build && cmake $(CMAKE_FLAGS) ..
ifneq ($(MAKE),)
	cd build && $(MAKE)
else
	cd build && make
endif

.PHONY: clean
clean:
	rm -rf build

.PHONY: doc
doc:
	@doxygen doc/Doxyfile
ifeq ($(UNAME),Darwin)
	@open doc/html/index.html
endif

.PHONY: test
test:
	@mkdir -p build
	cd build && cmake $(CMAKE_FLAGS) ..
ifneq ($(MAKE),)
	cd build && $(MAKE) run_tests
else
	cd build && make run_tests
endif