Skip to content

Commit

Permalink
Remove linking flag,
Browse files Browse the repository at this point in the history
This was crashing compilation in MacOSX.
  • Loading branch information
dentearl committed Sep 14, 2017
1 parent 6b6a73c commit 82077ac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mafExtractor/Makefile
Expand Up @@ -22,25 +22,25 @@ src/buildVersion.c: ${sources} ${dependencies}

${bin}/mafExtractor: src/mafExtractor.c ${dependencies} ${API}
mkdir -p $(dir $@)
${cxx} ${cflags} -O3 $< ${API} -o $@.tmp -lm
${cxx} ${cflags} -O3 $< ${API} -o $@.tmp
mv $@.tmp $@

test/mafExtractor: src/mafExtractor.c ${dependencies} ${testAPI}
mkdir -p $(dir $@)
${cxx} ${cflags} -g -O0 $< ${testAPI} -o $@.tmp -lm
${cxx} ${cflags} -g -O0 $< ${testAPI} -o $@.tmp
mv $@.tmp $@

%.o: %.c %.h
${cxx} -O3 -c ${cflags} $< -o $@.tmp -lm
${cxx} -O3 -c ${cflags} $< -o $@.tmp
mv $@.tmp $@

test/%.o: ${lib}/%.c ${inc}/%.h
mkdir -p $(dir $@)
${cxx} -c $< -o $@.tmp ${cflags} -g -O0 -lm
${cxx} -c $< -o $@.tmp ${cflags} -g -O0
mv $@.tmp $@
test/%.o: src/%.c src/%.h
mkdir -p $(dir $@)
${cxx} -c $< -o $@.tmp ${cflags} -g -O0 -lm
${cxx} -c $< -o $@.tmp ${cflags} -g -O0
mv $@.tmp $@

clean:
Expand All @@ -51,12 +51,12 @@ test: buildVersion test/allTests test/mafExtractor

test/allTests: src/allTests.c ${testObjects} ${testAPI}
mkdir -p $(dir $@)
${cxx} $^ -o $@.tmp ${cflags} -g -O0 -lm
${cxx} $^ -o $@.tmp ${cflags} -g -O0
mv $@.tmp $@

test/test.mafExtractor.o: src/test.mafExtractor.c src/test.mafExtractor.h ${testAPI}
mkdir -p $(dir $@)
${cxx} -c $< -o $@.tmp ${cflags} -I src/ -g -O0 -lm
${cxx} -c $< -o $@.tmp ${cflags} -I src/ -g -O0
mv $@.tmp $@

../external/CuTest.a: ../external/CuTest.c ../external/CuTest.h
Expand Down

1 comment on commit 82077ac

@joelmartin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w/o -lm the the compilation crashes on linux

Please sign in to comment.