1 CFLAGS
=-O3
-march
=core2
2 CXXFLAGS
=-O3
-march
=core2
7 all: main analyze compute_weights
10 $(MAKE
) CXXFLAGS
="-g -ggdb" CFLAGS
="-g -ggdb"
13 wget http
://www.lua.org
/ftp
/$(LUA
).
tar.gz
15 $(LUA
)/src
/liblua.a
: $(LUA
).
tar.gz
16 tar -xvzf
$(LUA
).
tar.gz
17 make
-C
$(LUA
)/src liblua.a MYCFLAGS
="-DLUA_USE_LINUX $(CFLAGS)"
19 main.o
: Makefile .main.dep
$(LUA
)/src
/liblua.a
20 analyze.o
: Makefile .analyze.dep
$(LUA
)/src
/liblua.a
21 compute_weights.o
: Makefile .compute_weights.dep
$(LUA
)/src
/liblua.a
23 .analyze.dep
: analyze.
cpp
24 $(CXX
) -MM analyze.
cpp > .analyze.dep
25 .compute_weights.dep
: compute_weights.
cpp
26 $(CXX
) -MM compute_weights.
cpp > .compute_weights.dep
28 $(CXX
) -MM main.
cpp > .main.dep
30 analyze
: .analyze.dep analyze.o
31 $(CXX
) $(LDFLAGS
) -I
$(LUA
)/src analyze.o
$(LUA
)/src
/liblua.a
-o analyze
32 compute_weights
: .compute_weights.dep compute_weights.o
33 $(CXX
) $(LDFLAGS
) -I
$(LUA
)/src compute_weights.o
$(LUA
)/src
/liblua.a
-o compute_weights
34 main
: .main.dep main.o
35 $(CXX
) $(LDFLAGS
) -I
$(LUA
)/src main.o
$(LUA
)/src
/liblua.a
-o main
41 .PHONY
: clean default
all
45 include .compute_weights.dep