mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
This patch which handles the build stuff is from Marcus Rueckert <darix@opensu.se>. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@901 726aef4b-f618-498e-8847-2d620e286838
74 lines
1.8 KiB
Makefile
74 lines
1.8 KiB
Makefile
prefix := @prefix@
|
|
exec_prefix := @exec_prefix@
|
|
datarootdir := @datarootdir@
|
|
bindir := @bindir@
|
|
datadir := @datadir@
|
|
sysconfdir := @sysconfdir@
|
|
libdir := @libdir@
|
|
sbindir := @sbindir@
|
|
localstatedir := @localstatedir@
|
|
CXX := @CXX@
|
|
CXXFLAGS := @CXXFLAGS@
|
|
LDFLAGS := @LDFLAGS@
|
|
INCLUDES := @INCLUDES@
|
|
LIBS := @LIBS@
|
|
prefix := @prefix@
|
|
|
|
SRCS := String.cpp Csocket.cpp main.cpp znc.cpp User.cpp IRCSock.cpp Client.cpp DCCBounce.cpp \
|
|
DCCSock.cpp Chan.cpp Nick.cpp Server.cpp Modules.cpp MD5.cpp Buffer.cpp Utils.cpp \
|
|
FileUtils.cpp HTTPSock.cpp Template.cpp
|
|
OBJS := $(patsubst %cpp,%o,$(SRCS))
|
|
CLEAN := znc znc-static *.o core core.*
|
|
DISTCLEAN := Makefile config.log config.status znc-config .depend \
|
|
modules/.depend modules/Makefile
|
|
|
|
.PHONY: all modules clean distclean install depend
|
|
|
|
all: @DEPEND@ znc @MODTARGET@
|
|
|
|
.depend:
|
|
$(CXX) -MM $(CXXFLAGS) $(SRCS) $(INCLUDES) >.depend
|
|
@if test -n "@MODTARGET@"; then \
|
|
$(MAKE) -C modules .depend; \
|
|
fi
|
|
|
|
depend: .depend
|
|
|
|
znc: $(OBJS)
|
|
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
znc-static: $(OBJS)
|
|
$(CXX) $(LDFLAGS) -static -o $@ $(OBJS) $(LIBS)
|
|
|
|
modules:
|
|
@if test -n "@MODTARGET@"; then \
|
|
$(MAKE) -C modules; \
|
|
else \
|
|
echo "Modules are not enabled"; \
|
|
fi
|
|
|
|
clean:
|
|
rm -rf $(CLEAN)
|
|
@if test -n "@MODTARGET@"; then \
|
|
$(MAKE) -C modules clean; \
|
|
fi
|
|
|
|
distclean: clean
|
|
rm -rf $(DISTCLEAN)
|
|
|
|
.cpp.o:
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
|
|
|
|
install: znc @MODTARGET@
|
|
mkdir -p $(DESTDIR)$(prefix)/bin
|
|
mkdir -p $(DESTDIR)$(prefix)/include/znc
|
|
install -m 0755 znc $(DESTDIR)$(prefix)/bin
|
|
install -m 0755 znc-config $(DESTDIR)$(prefix)/bin
|
|
install -m 0755 znc-buildmod $(DESTDIR)$(prefix)/bin
|
|
install -m 0644 *.h $(DESTDIR)$(prefix)/include/znc
|
|
@if test -n "@MODTARGET@"; then \
|
|
$(MAKE) -C modules install DESTDIR=$(DESTDIR); \
|
|
fi
|
|
|
|
-include .depend
|