mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Instead of having one big file which is generated in a seperated step, we now have a directory where serveral files are created. This fixes .depend, which was broken since we don't generate .o files for our modules. Everyone will have to delete his .depend file after this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@914 726aef4b-f618-498e-8847-2d620e286838
75 lines
1.8 KiB
Makefile
75 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@
|
|
DEPEND := yes
|
|
|
|
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
|
|
|
|
all: @DEPEND@ znc @MODTARGET@
|
|
|
|
.depend:
|
|
@mkdir -p .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)
|
|
|
|
ifeq ($(DEPEND), yes)
|
|
.cpp.o: .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
|
|
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 $(wildcard .depend/*.dep)
|