Revision 911d0520

View differences:

custompackages/graph-parser/Makefile
73 73
define Package/graph-parser/install
74 74
	$(INSTALL_DIR) $(1)/bin
75 75
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/graph-parser $(1)/bin/
76
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/simulation $(1)/bin/
76 77
	mkdir -p $(1)/input
77 78
	$(CP) $(PKG_BUILD_DIR)/input/* $(1)/input/
78 79
endef
custompackages/graph-parser/src/Makefile
5 5
INCLUDES = -I/usr/local/boost/
6 6

  
7 7
# define the C source files
8
SRCS = main.cpp bi_connected_components.cpp graph_manager.cpp parser.cpp sub_component.cpp utility.cpp
8
SRCS = bi_connected_components.cpp graph_manager.cpp parser.cpp sub_component.cpp utility.cpp
9 9

  
10 10

  
11 11
# define the C object files
......
19 19
OBJS = $(SRCS:.cpp=.o)
20 20

  
21 21
MAIN = main
22
BIN_FILE = graph-parser
22
MAIN_BIN = graph-parser
23
SIMULATION = simulation
23 24

  
24 25
# all: ../bin/$(MAIN)
25 26
# 	@echo  Simple compiler named main has been compiled
26 27

  
27
$(MAIN): $(OBJS)
28
	$(CXX) $(CFLAGS) $(INCLUDES) -o $(BIN_FILE) $(OBJS) $(LFLAGS) $(LIBS )
28
$(MAIN): $(MAIN).o $(SIMULATION).o $(OBJS)
29
	$(CXX) $(CFLAGS) $(INCLUDES) -o $(MAIN_BIN) $(MAIN).o $(OBJS) $(LFLAGS) $(LIBS )
30
	$(CXX) $(CFLAGS) $(INCLUDES) -o $(SIMULATION) $(SIMULATION).o $(OBJS) $(LFLAGS) $(LIBS )
31

  
32

  
33
$(SIMULATION): $(SIMULATION).o $(OBJS)
34
	$(CXX) $(CFLAGS) $(INCLUDES) -o $(SIMULATION) $(SIMULATION).o $(OBJS) $(LFLAGS) $(LIBS )
29 35

  
30 36
# this is a suffix replacement rule for building .o's from .c's
31 37
# it uses automatic variables $<: the name of the prerequisite of
custompackages/graph-parser/src/Makefile.arm
1
##############################################
2
# Makefile for graph-parser program
3
# This Makefile is used with OpenWRT. Therefore
4
# no $INCLUDES is defined.
5
# The BGL will be linked with the BGL in OpenWRT
6
##############################################
7

  
8
# define the C source files
9
SRCS = bi_connected_components.cpp graph_manager.cpp parser.cpp sub_component.cpp utility.cpp
10

  
11

  
12
# define the C object files
13
#
14
# This uses Suffix Replacement within a macro:
15
#   $(name:string1=string2)
16
#         For each word in 'name' replace 'string1' with 'string2'
17
# Below we are replacing the suffix .c of all words in the macro SRCS
18
# with the .o suffix
19
#
20
OBJS = $(SRCS:.cpp=.o)
21

  
22
MAIN = main
23
BIN_FILE = graph-parser
24

  
25
# all: ../bin/$(MAIN)
26
# 	@echo  Simple compiler named main has been compiled
27

  
28
$(MAIN): $(MAIN).o simulation.o $(OBJS)
29
	$(CXX) $(CFLAGS) $(MAIN).o $(OBJS) $(LFLAGS) -o $(BIN_FILE)
30
	# $(CXX) $(CFLAGS) simulation.o $(OBJS) $(LFLAGS) -o simulation
31

  
32
# $(CXX) $(CFLAGS) $(MAIN).o $(OBJS) $(LFLAGS) -o $(BIN_FILE)
33
# this is a suffix replacement rule for building .o's from .c's
34
# it uses automatic variables $<: the name of the prerequisite of
35
# the rule(a .c file) and $@: the name of the target of the rule (a .o file)
36
# (see the gnu make manual section about automatic variables)
37
.cpp.o:
38
	$(CXX) $(CFLAGS) -std=c++11 -c $<  -o $@
39

  
40
# remove object files and executable when user executes "make clean"
41
clean:
42
	$(RM) *.o $(BIN_FILE)
custompackages/graph-parser/src/Makefile.mips
1
##############################################
2
# Makefile for graph-parser program
3
# This Makefile is used with OpenWRT. Therefore
4
# no $INCLUDES is defined.
5
# The BGL will be linked with the BGL in OpenWRT
6
##############################################
7

  
8
# define the C source files
9
SRCS = bi_connected_components.cpp graph_manager.cpp parser.cpp sub_component.cpp utility.cpp
10

  
11

  
12
# define the C object files
13
#
14
# This uses Suffix Replacement within a macro:
15
#   $(name:string1=string2)
16
#         For each word in 'name' replace 'string1' with 'string2'
17
# Below we are replacing the suffix .c of all words in the macro SRCS
18
# with the .o suffix
19
#
20
OBJS = $(SRCS:.cpp=.o)
21

  
22
MAIN = main
23
BIN_FILE = graph-parser
24

  
25
CFLAGS=-mips32
26

  
27
$(MAIN): $(MAIN).o simulation.o $(OBJS)
28
	$(CXX) $(CFLAGS) $(MAIN).o $(OBJS) $(LFLAGS) -o $(BIN_FILE)
29
	$(CXX) $(CFLAGS) simulation.o $(OBJS) $(LFLAGS) -o simulation
30

  
31
# $(CXX) $(CFLAGS) $(MAIN).o $(OBJS) $(LFLAGS) -o $(BIN_FILE)
32
# this is a suffix replacement rule for building .o's from .c's
33
# it uses automatic variables $<: the name of the prerequisite of
34
# the rule(a .c file) and $@: the name of the target of the rule (a .o file)
35
# (see the gnu make manual section about automatic variables)
36
.cpp.o:
37
	$(CXX) $(CFLAGS) -std=c++11 -c $<  -o $@
38

  
39
# remove object files and executable when user executes "make clean"
40
clean:
41
	$(RM) *.o $(BIN_FILE)
custompackages/graph-parser/src/Makefile_openwrt
1
##############################################
2
# Makefile for graph-parser program
3
# This Makefile is used with OpenWRT. Therefore
4
# no $INCLUDES is defined.
5
# The BGL will be linked with the BGL in OpenWRT
6
##############################################
7

  
8
# define the C source files
9
SRCS = main.cpp bi_connected_components.cpp graph_manager.cpp parser.cpp sub_component.cpp utility.cpp
10

  
11

  
12
# define the C object files
13
#
14
# This uses Suffix Replacement within a macro:
15
#   $(name:string1=string2)
16
#         For each word in 'name' replace 'string1' with 'string2'
17
# Below we are replacing the suffix .c of all words in the macro SRCS
18
# with the .o suffix
19
#
20
OBJS = $(SRCS:.cpp=.o)
21

  
22
MAIN = main
23
BIN_FILE = graph-parser
24

  
25
# all: ../bin/$(MAIN)
26
# 	@echo  Simple compiler named main has been compiled
27

  
28
$(MAIN): $(OBJS)
29
	$(CXX) $(CFLAGS) $(OBJS) $(LFLAGS) -o $(BIN_FILE)
30

  
31
# this is a suffix replacement rule for building .o's from .c's
32
# it uses automatic variables $<: the name of the prerequisite of
33
# the rule(a .c file) and $@: the name of the target of the rule (a .o file)
34
# (see the gnu make manual section about automatic variables)
35
.cpp.o:
36
	$(CXX) $(CFLAGS) -std=c++11 -c $<  -o $@
37

  
38
# remove object files and executable when user executes "make clean"
39
clean:
40
	$(RM) *.o $(BIN_FILE)

Also available in: Unified diff