-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
69 lines (59 loc) · 2.42 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
## FILE: Makefile Date Modified: March 17, 2015
##
## PacketGenie
## Copyright 2014 The Regents of the University of Michigan
## Dong-Hyeon Park, Ritesh Parikh, Valeria Bertacco
##
## PacketGenie is licensed under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance
## with the License. You may obtain a copy of the License at
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
########## BOOST LINKING OPTIONS. ################################
#### IF - you have boost installed in a custom directory.#########
##################################################################
#BOOSTDIR = include/boost_1_56_0
#BOOSTLIB = $(BOOSTDIR)/stage/lib
#BOOST_LINK = $(BOOSTLIB)/libboost_program_options.a \
# $(BOOSTLIB)/libboost_regex.a
##################################################################
#### OR - you have boost installed in your system already ########
#### such as /usr/lib64 ########
##################################################################
BOOST_FLAG = -lboost
BOOST_LINK = -lboost_program_options -lboost_regex
##################################################################
BUILD_ROOT=$(shell pwd)
BOOKSIMDIR = src/intersim/
export BOOKSIM_OBJDIR=$(BUILD_ROOT)/obj/intersim/
CC = g++
CFLAGS = -c -Wall -Wno-unused-function -O3
LDFLAGS =
INCLUDE = -I $(BOOSTDIR) $(BOOST_FLAG)
OBJDIR = obj/
BINDIR = bin/
SRCDIR = src/
OBJLIST = reply_job.o \
packet.o \
port.o icnt_wrapper.o \
node_configs.o packet_handler.o node.o misc.o \
traffic_report_handler.o \
node_group.o globals.o traffic_pattern.o \
injection_process.o network.o packetgenie.o
OBJECTS = $(addprefix $(OBJDIR), $(OBJLIST) )
all: booksim packetgenie
packetgenie: $(OBJECTS) booksim
$(CC) $(LDFLAGS) $(OBJECTS) $(BOOKSIM_OBJDIR)/*.o \
-o $(BINDIR)/packetgenie $(BOOST_LINK)
$(OBJECTS): obj/%.o: src/%.cpp
$(CC) $(CFLAGS) $? -o $@ $(INCLUDE)
booksim: $(BOOKSIM_OBJDIR)/%.o: $(BOOKSIMDIR)/%.cpp
$(MAKE) "CREATE_LIBRARY=1" -C ./$(BOOKSIMDIR)
clean:
rm -rf obj/*.o
rm -rf $(BOOKSIM_OBJDIR)/*.o