-
Notifications
You must be signed in to change notification settings - Fork 494
/
Copy pathMakefile
38 lines (29 loc) · 981 Bytes
/
Makefile
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
# Example Makefile script
# Purpose: Demonstrate usage of pkg-config with the nanoflann library
# By: Jose Luis Blanco, 2011
#
# ========================= *IMPORTANT* ================================
# For this method to work nanoflann must be installed in your
# system in a path accesible to pkg-config. To check if pkg-config
# sees nanoflann config files, execute:
# pkg-config --list-all | grep nanoflann
# ======================================================================
#
# Set up basic variables:
CC = g++
CFLAGS = -c -Wall -O2 -mtune=native
LDFLAGS =
# List of sources:
SOURCES = pointcloud_example.cpp
OBJECTS = $(SOURCES:.cpp=.o)
# Name of executable target:
EXECUTABLE = pointcloud_example
# nanoflann flags:
CFLAGS += `pkg-config --cflags nanoflann`
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm $(OBJECTS) $(EXECUTABLE)