2011-07-29 00:18:10 +02:00
|
|
|
include Makefile.o.dep
|
|
|
|
|
2016-03-17 14:46:20 +01:00
|
|
|
current_path := $(shell pwd)
|
|
|
|
global_relative_working_dir := $(shell relative_path $(current_path) $(GLOBAL_WORKING_DIR))
|
|
|
|
|
2018-11-23 19:28:15 +01:00
|
|
|
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
|
2016-03-17 14:46:20 +01:00
|
|
|
|
2011-07-29 00:18:10 +02:00
|
|
|
name = export.so
|
|
|
|
|
|
|
|
|
|
|
|
all: $(name)
|
|
|
|
|
2014-02-14 12:20:22 +01:00
|
|
|
|
|
|
|
# -lcurl is used when linking the main winix.so so we don't have to use it here
|
2011-07-29 00:18:10 +02:00
|
|
|
$(name): $(o)
|
2016-03-17 14:46:20 +01:00
|
|
|
$(CXX) -shared -Wl,-soname,$(name) -o $(name) $(CXXFLAGS) $(winix_include_paths) $(LDFLAGS) *.o
|
2011-07-29 00:18:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%.o: %.cpp
|
2016-03-17 14:46:20 +01:00
|
|
|
$(CXX) -c $(CXXFLAGS) $(winix_include_paths) $<
|
2011-07-29 00:18:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
depend:
|
2016-03-17 14:46:20 +01:00
|
|
|
makedepend -Y. $(winix_include_paths) -f- *.cpp > Makefile.dep
|
2011-07-29 00:18:10 +02:00
|
|
|
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
|
2013-10-15 23:57:51 +02:00
|
|
|
rm -f *.so
|
2011-07-29 00:18:10 +02:00
|
|
|
rm -f $(name)
|
|
|
|
|
|
|
|
include Makefile.dep
|