global winixd/Makefile uses now 'find' for looking for *.cpp files

and we don't need Makefiles in subdirectories anymore (except plugins)
This commit is contained in:
2022-06-26 06:22:27 +02:00
parent 56d87c4410
commit 26226de865
53 changed files with 16781 additions and 22045 deletions

View File

@@ -1,33 +1,31 @@
include Makefile.o.dep
sourcefiles:=$(shell find . -name "*.cpp")
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
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 = menu.so
all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name) -o $(name) $(CXXFLAGS) $(winix_include_paths) $(LDFLAGS) *.o
$(name): $(objfiles)
$(CXX) -shared -Wl,-soname,$(name) -o $(name) $(CXXFLAGS) $(LDFLAGS) $(objfiles)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(winix_include_paths) $<
$(CXX) -c $(CXXFLAGS) -o $@ $<
clean:
rm -f $(objfiles)
rm -f $(name)
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
makedepend -Y. $(WINIX_PLUGINS_MAKEDEPEND_INCLUDES) $(WINIX_NEEDED_MACROS) -f- $(sourcefiles) > Makefile.dep
clean:
rm -f *.o
rm -f *.so
rm -f $(name)
include Makefile.dep
-include Makefile.dep