# Based on the C++ dlopen mini HOWTO. You can find the complete
# HOWTO and/or updated versions at
# http://www.isotton.com/howtos/C++-dlopen-mini-HOWTO/

all: demo
	./$<

demo: main.c hello.so
	gcc-4.0 -O0 -g -pthread -o $@ $< -ldl

hello.so: hello.cpp
	g++-4.0 -O0 -g -shared -o $@ $< 

clean:
	rm -f demo hello.so

.PHONY: clean all
