Statistics
| Branch: | Revision:

root / custompackages / graph-parser / src / Makefile.arm @ 911d0520

History | View | Annotate | Download (1.4 KB)

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)