1 | #
|
---|
2 | # Purpose: Makefile for building the executable
|
---|
3 | # Remark: None.
|
---|
4 | #
|
---|
5 | TARGET_FILENAME=shm
|
---|
6 |
|
---|
7 | BOOST_VERSION=1_39
|
---|
8 |
|
---|
9 | CPP_FILENAME=shm.cpp
|
---|
10 | O_FILENAME=$(TARGET_FILENAME).o
|
---|
11 |
|
---|
12 | CPP_FLAGS=-O0 -g \
|
---|
13 | -Wall -Wextra -std=c++0x -pedantic -Wtrigraphs -Wunused-parameter \
|
---|
14 | -I /usr/local/include/boost-$(BOOST_VERSION)
|
---|
15 |
|
---|
16 | LIBS=-lboost_thread-gcc43-mt-$(BOOST_VERSION)
|
---|
17 |
|
---|
18 | #-lboost_regex-gcc43-mt-$(BOOST_VERSION)
|
---|
19 | #-lboost_program_options-gcc43-mt-$(BOOST_VERSION)
|
---|
20 | #-lboost_serialization-gcc43-$(BOOST_VERSION)
|
---|
21 |
|
---|
22 | LD_FLAGS=-L/usr/local/lib/ $(LIBS)
|
---|
23 |
|
---|
24 | .PHONY: all
|
---|
25 | all: $(TARGET_FILENAME)
|
---|
26 |
|
---|
27 | $(TARGET_FILENAME): $(O_FILENAME)
|
---|
28 | g++ $< -o $@ $(LD_FLAGS)
|
---|
29 |
|
---|
30 | $(O_FILENAME): $(CPP_FILENAME)
|
---|
31 | g++ $(CPP_FLAGS) $< -c -o $@
|
---|
32 |
|
---|
33 | .PHONY: clean
|
---|
34 | clean:
|
---|
35 | rm -f $(TARGET_FILENAME)
|
---|
36 | rm -f $(O_FILENAME)
|
---|
37 | rm -f *~
|
---|