Ticket #5548: Makefile

File Makefile, 780 bytes (added by habdank@…, 11 years ago)
Line 
1#
2# Purpose: Makefile for building the executable
3# Remark: None.
4#
5TARGET_FILENAME=shm
6
7BOOST_VERSION=1_39
8
9CPP_FILENAME=shm.cpp
10O_FILENAME=$(TARGET_FILENAME).o
11
12CPP_FLAGS=-O0 -g \
13 -Wall -Wextra -std=c++0x -pedantic -Wtrigraphs -Wunused-parameter \
14 -I /usr/local/include/boost-$(BOOST_VERSION)
15
16LIBS=-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
22LD_FLAGS=-L/usr/local/lib/ $(LIBS)
23
24.PHONY: all
25all: $(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
34clean:
35 rm -f $(TARGET_FILENAME)
36 rm -f $(O_FILENAME)
37 rm -f *~