forked from whitefield-framework/whitefield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.airline
41 lines (31 loc) · 1.08 KB
/
Makefile.airline
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
include config.inc
ifneq ($(AIRLINE_NS3),)
CFLAGS+=-I$(AIRLINE_NS3)/build
LIBS+=-L$(AIRLINE_NS3)/build/lib -lns3-dev-core-$(REL) -lns3-dev-lr-wpan-$(REL) -lns3-dev-network-$(REL) -lns3-dev-spectrum-$(REL) -lns3-dev-mobility-$(REL) -lns3-dev-propagation-$(REL) -lns3-dev-stats-$(REL) -lns3-dev-antenna-$(REL)
endif
SRC=src/airline
CL_SRC=src
LIBS+=-lpthread -L$(BINDIR) -lwf_commline
CFLAGS+=-std=c++11 -Wall -I$(CL_SRC) -I$(SRC)
TARGET=$(BINDIR)/whitefield
# Should be equivalent to your list of C files, if you don't build selectively
SRCS=$(wildcard $(SRC)/*.cc)
SRCS+=$(wildcard $(SRC)/$(AIRLINE)/*.cc)
OBJS=$(addprefix $(BINDIR)/,$(SRCS:.cc=.o))
#$(info $(OBJS))
CFLAGS+=-I$(SRC)/$(AIRLINE)
GLOBAL_HDR=$(SRC)/common.h $(SRC)/Config.h
ifeq ($(REL),debug)
CFLAGS+=-g
endif
all: $(BINDIR)/$(SRC) $(TARGET)
$(TARGET): $(OBJS)
g++ -o $(TARGET) $(OBJS) $(CFLAGS) $(LIBS)
$(BINDIR)/%.o: %.cc %.h $(GLOBAL_HDR)
g++ -c -o $@ $< $(CFLAGS) $(LIBS)
$(BINDIR)/%.o: %.cc $(GLOBAL_HDR)
g++ -c -o $@ $< $(CFLAGS) $(LIBS)
$(BINDIR)/$(SRC):
@mkdir -p $(BINDIR)/$(SRC)/$(AIRLINE)
clean:
@rm -rf $(BINDIR)