mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@66 726aef4b-f618-498e-8847-2d620e286838
35 lines
779 B
Makefile
35 lines
779 B
Makefile
prefix=@prefix@
|
|
CXX=g++
|
|
CXXFLAGS=@CXXFLAGS@
|
|
INCLUDES=@INCLUDES@ -I..
|
|
LIBS=@LIBS@
|
|
VPATH=.:..
|
|
OBJS=$(addsuffix .o, $(basename $(wildcard *.cpp)))
|
|
SRCS=$(wildcard *.cpp) $(wildcard ../*.cpp)
|
|
INSTALL_TARGS=$(foreach file, $(addsuffix .so, $(basename $(wildcard *.cpp))), install_$(file))
|
|
|
|
all: $(OBJS) $(addsuffix .so, $(basename $(wildcard *.cpp)))
|
|
|
|
depend::
|
|
g++ -M $(CXXFLAGS) $(SRCS) $(INCLUDES) >.depend
|
|
|
|
install: all create_install_dir $(INSTALL_TARGS)
|
|
@echo -n ""
|
|
|
|
create_install_dir:
|
|
mkdir -p $(DEST)$(prefix)/share/znc
|
|
|
|
install_%:
|
|
install -m 0711 $(subst install_,,$@) $(DEST)$(prefix)/share
|
|
|
|
clean:
|
|
rm -rf *.so *.o core core.*
|
|
|
|
-include .depend
|
|
|
|
%.so: %.o
|
|
$(CXX) $(CXXFLAGS) -shared -o $@ $< $(INCLUDES) $(LIBS)
|
|
|
|
%.o: %.cpp
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
|