1
vote
1answer
27 views

Looping in bash from Makefile

i need to write a Makefile that compiles each .cpp in current directory in .so file (with flags -shared -fPIC) and copyies .so file into "../../dir/" directory without ".so" extension. For example, ...
0
votes
1answer
187 views

How can I get the bash $RANDOM in a makefile?

This works on OSX: RANDOM := $(shell /bin/bash -c "echo $$RANDOM") test: echo $(RANDOM) For cross platform random numbers I've instead resorted to this: RANDOM := $(shell od -An -N2 -i ...
1
vote
1answer
735 views

Bash is abnormal in Makefile!

all, I have found that the same Makefile works well in Mac OS X, but does not work in Ubuntu. The snippet is as following: start: @echo $(seperator) @if [[ "$(PROJECT)" == "" ]]; then \ ...