CARGS=-std=c99 -Wall all: safe unsafe @echo @echo invoking "safe" @echo LD_LIBRARY_PATH=. ./safe @echo @echo invoking "unsafe" @echo LD_LIBRARY_PATH=. ./unsafe unsafe: main.c libcppmodule.so gcc $(CARGS) -DUNSAFE_JUMP -o unsafe libcppmodule.so main.c safe: main.c libcppmodule.so gcc $(CARGS) -o safe libcppmodule.so main.c libcppmodule.so: cppmodule.cpp g++ -Wall -fPIC -shared -o libcppmodule.so cppmodule.cpp clean: rm -f libcppmodule.so safe unsafe