Files
znc/modules/Makefile.in
imaginos 467f1b8f7a made modperl global
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@351 726aef4b-f618-498e-8847-2d620e286838
2005-05-22 19:41:12 +00:00

69 lines
1.9 KiB
Makefile

prefix=@prefix@
CXX=g++
CXXFLAGS=@CXXFLAGS@
INCLUDES=@INCLUDES@ -I..
LIBS=@LIBS@
PERL=@PERL@
ifneq "$(PERL)" ""
PERLCC=-DHAVE_PERL `$(PERL) -MExtUtils::Embed -e ccopts`
PERLLD=`$(PERL) -MExtUtils::Embed -e ccopts -e ldopts`
endif
VPATH=.:..
ifeq "@NOSSL@" "1"
TARGETS=$(foreach file, $(wildcard *.cpp), $(if $(shell grep HAVE_LIBSSL $(file)),, $(addsuffix .so, $(basename $(file)))))
INSTALL_TARGS=$(foreach file, $(wildcard *.cpp), $(if $(shell grep HAVE_LIBSSL $(file)),, install_$(addsuffix .so, $(basename $(file)))))
OBJS=$(foreach file, $(wildcard *.cpp), $(if $(shell grep HAVE_LIBSSL $(file)),, $(addsuffix .o, $(basename $(file)))))
SRCS=$(wildcard ../*.cpp) $(foreach file, $(wildcard *.cpp), $(if $(shell grep HAVE_LIBSSL $(file)),,$(file)))
else
TARGETS=$(addsuffix .so, $(basename $(wildcard *.cpp)))
INSTALL_TARGS=$(foreach file, $(addsuffix .so, $(basename $(wildcard *.cpp))), install_$(file))
OBJS=$(addsuffix .o, $(basename $(wildcard *.cpp)))
SRCS=$(wildcard *.cpp) $(wildcard ../*.cpp)
endif
all: $(OBJS) $(TARGETS)
depend::
g++ -M $(CXXFLAGS) $(SRCS) $(INCLUDES) $(PERLCC) >.depend
install: all create_install_dir $(INSTALL_TARGS)
@echo -n ""
create_install_dir:
mkdir -p $(DESTDIR)$(prefix)/share/znc
install_%:
install -m 0755 $(subst install_,,$@) $(DESTDIR)$(prefix)/share/znc
clean:
rm -rf *.so *.o core core.*
-include .depend
%.so: %.o
$(CXX) $(CXXFLAGS) -shared -o $@ $< $(INCLUDES) $(LIBS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
ifneq "$(PERL)" ""
g_modperl.so: g_modperl.o
$(CXX) $(CXXFLAGS) -shared -o $@ $< $(INCLUDES) $(LIBS) $(PERLLD)
g_modperl.o: g_modperl.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ g_modperl.cpp $(PERLCC)
install_g_modperl.so:
install -m 0755 g_modperl.so $(DESTDIR)$(prefix)/share/znc
for i in *.pm; do \
install -m 0755 $$i $(DESTDIR)$(prefix)/share/znc; \
done
else
g_modperl.so:
@echo -n ""
g_modperl.o:
@echo -n ""
install_g_modperl.so:
@echo -n ""
endif