include Makefile.o.dep current_path := $(shell pwd) global_relative_working_dir := $(shell relative_path $(current_path) $(GLOBAL_WORKING_DIR)) winix_include_paths = -I$(global_relative_working_dir)/winix/winixd -I$(global_relative_working_dir)/ezc/src -I$(global_relative_working_dir)/tito/src -I$(global_relative_working_dir)/morm/src -I$(global_relative_working_dir)/pikotools/src name = export.so all: $(name) # -lcurl is used when linking the main winix.so so we don't have to use it here $(name): $(o) $(CXX) -shared -Wl,-soname,$(name) -o $(name) $(CXXFLAGS) $(winix_include_paths) $(LDFLAGS) *.o %.o: %.cpp $(CXX) -c $(CXXFLAGS) $(winix_include_paths) $< depend: makedepend -Y. $(winix_include_paths) -f- *.cpp > Makefile.dep echo -n "o = " > Makefile.o.dep ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep clean: rm -f *.o rm -f *.so rm -f $(name) include Makefile.dep