Statistics
| Branch: | Revision:

root / custompackages / graph-parser / src / Makefile_openwrt @ 1e73dd2a

History | View | Annotate | Download (1.25 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 = 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)