mirror of
https://github.com/znc/znc.git
synced 2026-07-01 07:21:44 +02:00
Fix out-of-tree builds
Instead of using sed to strip away the source dir this now uses make's notdir. $(notdir this/is/an/example) results in example. This also moved the generated dependency files from .depend/extra into .depend/ Since we need the extra/ path prefix for the modules from modules/extra, that one is added back via addprefix. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1610 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+3
-6
@@ -31,15 +31,13 @@ ifneq "$(LIBZNC)" ""
|
||||
LDFLAGS += -L.. -lznc -Wl,-rpath,$(LIBZNCDIR)
|
||||
endif
|
||||
|
||||
FILES := $(wildcard $(srcdir)/*.cpp)
|
||||
FILES := $(notdir $(wildcard $(srcdir)/*.cpp))
|
||||
# If extra is enabled
|
||||
ifeq "@EXTRA@" "yes"
|
||||
FILES += $(wildcard $(srcdir)/extra/*.cpp)
|
||||
FILES += $(addprefix extra/, $(notdir $(wildcard $(srcdir)/extra/*.cpp)))
|
||||
endif
|
||||
|
||||
FILES := $(basename $(FILES))
|
||||
# Strip away the srcdir, we want them to be created in the current dir
|
||||
FILES := $(shell echo $(FILES) | sed -e "s: $(srcdir)/: :g")
|
||||
|
||||
ifeq "@NOSSL@" "1"
|
||||
FILES := $(foreach file, $(FILES), \
|
||||
@@ -101,9 +99,8 @@ clean:
|
||||
|
||||
%.so: %.cpp Makefile
|
||||
@mkdir -p .depend
|
||||
@mkdir -p .depend/extra
|
||||
@mkdir -p extra
|
||||
$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -o $@ $< $($(shell echo '$(basename $@)' | sed -e 's:extra/::')FLAGS) -MMD -MF .depend/$@.dep
|
||||
$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -o $@ $< $($(notdir $(basename $@))FLAGS) -MMD -MF .depend/$(notdir $@).dep
|
||||
|
||||
modperl_install: create_install_dir
|
||||
for i in $(srcdir)/*.pm; do \
|
||||
|
||||
Reference in New Issue
Block a user