Browse Source

Make symlinks on all binary files in directory bin

test
Michael Uleysky 9 years ago
parent
commit
4463f6b69a
  1. 13
      Makefile

13
Makefile

@ -17,7 +17,7 @@ SOURCE = $(wildcard *.cpp)
DEPENDS = $(subst .cpp,.d,$(SOURCE))
OBJECTS = $(subst .cpp,.o,$(SOURCE))
../../bin/$(MODULE).so: $(OBJECTS)
$(MODULE).so: $(OBJECTS)
$(CC) -shared -o $@ $(OBJECTS) $(LDFLAGS) $(MODLIBS)
%.o: %.cpp
@ -32,7 +32,7 @@ clean:
rm -f *.d *.o
distclean: clean
rm -f ../../bin/$(MODULE).so
rm -f $(MODULE).so
else
@ -45,14 +45,17 @@ MODOBJECTS = $(subst .cpp,.o,$(MODSOURCE))
MODDEPS = $(subst .cpp,.d,$(MODSOURCE))
modules: $(MODSOURCE) $(MODHEADERS)
[ -d bin ] || mkdir bin
for dir in $(MODDIRS); do\
make -C $$dir -f ../../Makefile MODULE=$${dir/*\//};\
mod=$${dir/*\//};\
make -C $$dir -f ../../Makefile MODULE=$$mod && ln -sf ../$$dir/$${mod}.so bin/$${mod}.so;\
done
all: modules makemap
makemap: $(MODOBJECTS)
make -C src MODLIBS="$(MODLIBS)" MODOBJECTS="$(patsubst %,../%,$(MODOBJECTS))";
[ -d bin ] || mkdir bin
make -C src MODLIBS="$(MODLIBS)" MODOBJECTS="$(patsubst %,../%,$(MODOBJECTS))" && ln -sf ../src/makemap bin/makemap
$(MODOBJECTS): $(MODSOURCE) $(MODHEADERS)
for dir in $(MODDIRS); do\
@ -70,6 +73,8 @@ distclean:
make -C $$dir -f ../../Makefile MODULE=$${dir/*\//} distclean;\
done
make -C src distclean
rm -f bin/*
rmdir bin
-include $(wildcard modules/*/makemod) $(wildcard extramodules/*/makemod)

Loading…
Cancel
Save