-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
executable file
·53 lines (39 loc) · 1.29 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 2015 Samsung Austin Semiconductor, LLC.
# Description: Makefile for building a cbp 2016 submission.
#
# The following commands and Makefile worked for CENTOS v7:
# =========================================================
# yum install gcc-c++
# yum install boost
# yum install boost-devel.x86_64
#
# The following commands worked for Ubuntu:
#==========================================
# sudo apt-get update
# sudo apt-get install g++ libboost-all-dev
#
#
# include path to Boost area on local machine
export BOOST := /usr/
ifndef BOOST
$(error "You must define BOOST")
endif
export CBP_BASE := $(CURDIR)/..
CXX := g++
OBJDIR := $(CBP_BASE)/bin
SRC := $(CBP_BASE)/sim
VPATH := $(SRC)
LDLIBS += -lboost_iostreams
LDFLAGS += -L$(BOOST)/lib -Wl,-rpath $(BOOST)/lib
CPPFLAGS := -O3 -Wall -std=c++11 -Wextra -Winline -Winit-self -Wno-sequence-point\
-Wno-unused-function -Wno-inline -fPIC -W -Wcast-qual -Wpointer-arith -Woverloaded-virtual\
-I$(CBP_BASE) -I/usr/include -I/user/include/boost/ -I/usr/include/boost/iostreams/ -I/usr/include/boost/iostreams/device/
PROGRAMS := bt9_reader
objects = main.o
all: $(PROGRAMS)
bt9_reader : $(objects)
$(CXX) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
dbg: clean
$(MAKE) DBG_BUILD=1 all
clean:
rm -f $(PROGRAMS) $(objects)