This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
66 lines (46 loc) · 1.92 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
# Modify this line to point to where XSD is installed
xsd_install := /home/ymj/tarballs/xsd-4.0.0-x86_64-linux-gnu
root := $(xsd_install)/examples
include $(root)/build/cxx/rules.make
XSD := $(shell if test -x $(xsd_install)/bin/xsd; \
then echo $(xsd_install)/bin/xsd; \
else echo xsd; fi)
override CPPFLAGS += $(shell if test -d $(xsd_install)/libxsd; \
then echo -I$(xsd_install)/libxsd; fi)
override LIBS := -lxerces-c $(LIBS)
# Rules.
#
.PRECIOUS: %.cxx %.hxx %.ixx
%.cxx %.hxx %.ixx: %.xsd
$(XSD) cxx-tree $(XSDFLAGS) $<
CXX = g++
OBJS = kern/generator.o kern/node.o kern/network-hardware.o kern/hub.o kern/point-to-point.o kern/bridge.o kern/ap.o kern/application.o kern/ping.o kern/udp-echo.o kern/tcp-large-transfer.o kern/tap.o kern/emu.o kern/utils.o kern/udp.o kern/udp-cosem.o kern/data-concentrator.o kern/meter-data-management.o kern/demand-response.o kern/flow.o
override XSDFLAGS += --generate-inline --generate-ostream --generate-serialization
# Build.
#
ns-3-codegenerator: ns-3-codegenerator.o TopologySchema.o $(OBJS)
TopologySchema.o: TopologySchema.cxx TopologySchema.hxx TopologySchema.ixx
ns-3-codegenerator.o: ns-3-codegenerator.cxx TopologySchema.hxx TopologySchema.ixx
TopologySchema.cxx TopologySchema.hxx TopologySchema.ixx: TopologySchema.xsd
# Build documentation
#
.PHONY: docs
docs:
$(shell $(xsd_install)/bin/xsd cxx-tree --generate-serialization --generate-doxygen TopologySchema.xsd)
$(shell doxygen -g TopologySchema.doxygen)
$(shell doxygen TopologySchema.doxygen)
# Test
#
.PHONY: test
test: ns-3-codegenerator AMISimpleWireless_xml
./ns-3-codegenerator AMISimpleWireless_xml AMISimpleWireless_cc.cc
# Clean.
#
.PHONY: clean
clean:
rm -f TopologySchema.o TopologySchema.?xx ns-3-codegenerator.o ns-3-codegenerator AMISimpleWireless_cc.cc kern/*.o
# Clean documentation
#
.PHONY: cleandocs
cleandocs:
rm -rf ./html ./latex TopologySchema.doxygen