Skip to content

Commit bb4da30

Browse files
author
Maxim Egorushkin
committed
Obsolete makefile clutter removed.
1 parent f001bee commit bb4da30

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

Makefile

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ recompile := ${build_dir}/.make/recompile
7373
relink := ${build_dir}/.make/relink
7474

7575
COMPILE.CXX = ${CXX} -o $@ -c ${cppflags} ${cxxflags} -MD -MP $(abspath $<)
76-
COMPILE.S = ${CXX} -o- -S -fverbose-asm -masm=intel ${cppflags} ${cxxflags} $(abspath $<) | c++filt | egrep -v '^[[:space:]]*\.(loc|cfi|L[A-Z])' > $@
77-
PREPROCESS.CXX = ${CXX} -o $@ -E ${cppflags} ${cxxflags} $(abspath $<)
7876
COMPILE.C = ${CC} -o $@ -c ${cppflags} ${cflags} -MD -MP $(abspath $<)
7977
LINK.EXE = ${LD} -o $@ $(ldflags) $(filter-out ${relink},$^) $(ldlibs)
8078
LINK.SO = ${LD} -o $@ -shared $(ldflags) $(filter-out ${relink},$^) $(ldlibs)
@@ -88,13 +86,14 @@ else
8886
strip2 = $(strip ${1})
8987
endif
9088

89+
#
90+
# Build targets definitions begin.
91+
#
92+
9193
exes := benchmarks tests example
9294

9395
all : ${exes}
9496

95-
${exes} : % : ${build_dir}/%
96-
ln -sf ${<:${CURDIR}/%=%}
97-
9897
benchmarks_src := benchmarks.cc cpu_base_frequency.cc huge_pages.cc
9998
${build_dir}/benchmarks : cppflags += ${cppflags.tbb} ${cppflags.moodycamel} ${cppflags.xenium}
10099
${build_dir}/benchmarks : cxxflags += ${cxxflags.tbb} ${cxxflags.moodycamel} ${cxxflags.xenium}
@@ -115,6 +114,13 @@ ${build_dir}/example : ${example_src:%.cc=${build_dir}/%.o} ${relink} | ${build_
115114
$(call strip2,${LINK.EXE})
116115
-include ${example_src:%.cc=${build_dir}/%.d}
117116

117+
#
118+
# Build targets definitions end.
119+
#
120+
121+
${exes} : % : ${build_dir}/%
122+
ln -sf ${<:${CURDIR}/%=%}
123+
118124
${build_dir}/%.so : cxxflags += -fPIC
119125
${build_dir}/%.so : ${relink} | ${build_dir}
120126
$(call strip2,${LINK.SO})
@@ -128,14 +134,6 @@ ${build_dir}/%.o : src/%.cc ${recompile} | ${build_dir}
128134
${build_dir}/%.o : src/%.c ${recompile} | ${build_dir}
129135
$(call strip2,${COMPILE.C})
130136

131-
${build_dir}/%.S : cppflags += ${cppflags.tbb} ${cppflags.moodycamel} ${cppflags.xenium}
132-
${build_dir}/%.S : src/%.cc ${recompile} | ${build_dir}
133-
$(call strip2,${COMPILE.S})
134-
135-
${build_dir}/%.I : cppflags += ${cppflags.tbb} ${cppflags.moodycamel} ${cppflags.xenium}
136-
${build_dir}/%.I : src/%.cc ${recompile} | ${build_dir}
137-
$(call strip2,${PREPROCESS.CXX})
138-
139137
${build_dir}/%.d : ;
140138

141139
${build_dir}/.make : | ${build_dir}
@@ -177,7 +175,7 @@ rtags :
177175
${MAKE} --always-make --just-print all | { rtags-rc -c -; true; }
178176

179177
clean :
180-
rm -rf ${build_dir} ${exes}
178+
rm -rf ${exes} ${build_dir}
181179

182180
versions:
183181
${MAKE} --version | awk 'FNR<2'
@@ -187,6 +185,9 @@ env :
187185
env | sort --ignore-case
188186

189187
.PHONY : update_env_txt env versions rtags run_benchmarks clean all run_%
188+
.DELETE_ON_ERROR:
189+
.SECONDARY:
190+
.SUFFIXES:
190191

191192
# Local Variables:
192193
# compile-command: "/bin/time make -rC ~/src/atomic_queue -j$(($(nproc)/2)) BUILD=debug run_tests"

0 commit comments

Comments
 (0)