-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 765 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 765 Bytes
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
AR = ar
CXX = g++
CXXFLAGS = -g -ggdb -Wall
LDFLAGS =
TYPE = GENERIC
#TYPE = LINKSTATE
#TYPE = DISTANCEVECTOR
LIB_OBJS = node.o \
link.o \
table.o \
messages.o \
topology.o \
event.o \
eventqueue.o \
context.o \
EXEC_OBJS = routesim.o
OBJS = $(LIB_OBJS) $(EXEC_OBJS)
all: $(EXEC_OBJS:.o=)
%.o : %.cc
$(CXX) $(CXXFLAGS) -D$(TYPE) -c $< -o $(@F)
libroutelab.a: $(LIB_OBJS)
$(AR) ruv libroutelab.a $(LIB_OBJS)
routesim: routesim.o libroutelab.a
$(CXX) $(LDFLAGS) routesim.o $(GENERIC) libroutelab.a -o routesim
depend:
$(CXX) $(CXXFLAGS) -D$(TYPE) -MM $(OBJS:.o=.cc) > .dependencies
clean:
rm -f $(OBJS) $(EXEC_OBJS:.o=) libroutelab.a
include .dependencies