diff --git a/Makefile.in b/Makefile.in index 81fd6691..ec4f9d89 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,24 +22,17 @@ CLEAN := znc znc-static *.o core core.* DISTCLEAN := Makefile config.log config.status znc-config .depend \ modules/.depend modules/Makefile -DEPEND := $(wildcard .depend) -ifeq ($(DEPEND), ) -DEPEND := no -else -DEPEND := yes -endif - -.PHONY: all modules clean distclean install +.PHONY: all modules clean depend distclean install all: znc @MODTARGET@ .depend: @mkdir -p .depend - @if test -n "@MODTARGET@"; then \ - $(MAKE) -C modules .depend ; \ - fi depend: .depend + @if test -n "@MODTARGET@"; then \ + $(MAKE) -C modules depend ; \ + fi znc: $(OBJS) $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) @@ -63,13 +56,8 @@ clean: distclean: clean rm -rf $(DISTCLEAN) -ifeq ($(DEPEND), yes) -.cpp.o: +%.o: %.cpp .depend $(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $< -MMD -MF .depend/$<.dep -else -.cpp.o: - $(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $< -endif install: znc @MODTARGET@ mkdir -p $(DESTDIR)$(prefix)/bin diff --git a/modules/Makefile.in b/modules/Makefile.in index 26f8a638..a5aeb20b 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -47,14 +47,7 @@ TARGETS := $(addsuffix .so, $(FILES)) CLEAN := *.so -DEPEND := $(wildcard .depend) -ifeq ($(DEPEND), ) -DEPEND := no -else -DEPEND := yes -endif - -.PHONY: all clean install modperl_install +.PHONY: all clean depend install modperl_install all: $(TARGETS) @@ -81,13 +74,8 @@ install_metadirs: create_install_dir clean: rm -rf $(CLEAN) -ifeq ($(DEPEND), yes) -%.so: %.cpp +%.so: %.cpp .depend $(CXX) $(MODFLAGS) $(INCLUDES) $(LDFLAGS) -shared -o $@ $< $($(basename $<)FLAGS) -MMD -MF .depend/$<.dep -else -%.so: %.cpp - $(CXX) $(MODFLAGS) $(INCLUDES) $(LDFLAGS) -shared -o $@ $< $($(basename $<)FLAGS) -endif modperl_install: create_install_dir for i in *.pm; do \