diff --git a/Makefile.in b/Makefile.in index 524fbb69..1171c8f3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ includedir := @includedir@ sbindir := @sbindir@ localstatedir := @localstatedir@ CXX := @CXX@ -CXXFLAGS := @CPPFLAGS@ @CXXFLAGS@ -I$(srcdir)/headers -Iheaders +CXXFLAGS := @CPPFLAGS@ @CXXFLAGS@ -I$(srcdir)/include -Iinclude LDFLAGS := @LDFLAGS@ LIBS := @LIBS@ LIBZNC := @LIBZNC@ @@ -32,10 +32,11 @@ LIB_SRCS := ZNCString.cpp Csocket.cpp znc.cpp IRCNetwork.cpp User.cpp IRCSock.c Client.cpp Chan.cpp Nick.cpp Server.cpp Modules.cpp MD5.cpp Buffer.cpp Utils.cpp \ FileUtils.cpp HTTPSock.cpp Template.cpp ClientCommand.cpp Socket.cpp SHA256.cpp \ WebModules.cpp Listener.cpp Config.cpp ZNCDebug.cpp -BIN_SRCS := main.cpp +LIB_SRCS := $(addprefix src/,$(LIB_SRCS)) +BIN_SRCS := src/main.cpp LIB_OBJS := $(patsubst %cpp,%o,$(LIB_SRCS)) BIN_OBJS := $(patsubst %cpp,%o,$(BIN_SRCS)) -CLEAN := znc *.o core core.* +CLEAN := znc src/*.o core core.* DISTCLEAN := Makefile config.log config.status znc-config znc-buildmod .depend \ modules/.depend modules/Makefile man/Makefile znc.pc znc-uninstalled.pc @@ -96,10 +97,10 @@ clean: distclean: clean rm -rf $(DISTCLEAN) -%.o: %.cpp Makefile - @mkdir -p .depend - $(E) Building $@... - $(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MMD -MF .depend/$@.dep +src/%.o: src/%.cpp Makefile + @mkdir -p .depend src + $(E) Building core object $*... + $(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MMD -MF .depend/$*.dep install: znc $(LIBZNC) mkdir -p $(DESTDIR)$(bindir) @@ -113,8 +114,8 @@ install: znc $(LIBZNC) $(INSTALL_PROGRAM) znc $(DESTDIR)$(bindir) $(INSTALL_SCRIPT) znc-config $(DESTDIR)$(bindir) $(INSTALL_SCRIPT) znc-buildmod $(DESTDIR)$(bindir) - $(INSTALL_DATA) $(srcdir)/headers/znc/*.h $(DESTDIR)$(includedir)/znc - $(INSTALL_DATA) headers/znc/zncconfig.h $(DESTDIR)$(includedir)/znc + $(INSTALL_DATA) $(srcdir)/include/znc/*.h $(DESTDIR)$(includedir)/znc + $(INSTALL_DATA) include/znc/zncconfig.h $(DESTDIR)$(includedir)/znc $(INSTALL_DATA) znc.pc $(DESTDIR)$(PKGCONFIGDIR) @$(MAKE) -C modules install DESTDIR=$(DESTDIR); if test -n "$(LIBZNC)"; then \ diff --git a/configure.ac b/configure.ac index f28b6384..d988c917 100644 --- a/configure.ac +++ b/configure.ac @@ -9,9 +9,9 @@ AC_PREREQ([2.62]) dnl Keep the version number in sync with main.h! AC_INIT([znc], [0.203]) AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_SRCDIR([znc.cpp]) +AC_CONFIG_SRCDIR([src/znc.cpp]) AC_LANG([C++]) -AC_CONFIG_HEADERS([headers/znc/zncconfig.h]) +AC_CONFIG_HEADERS([include/znc/zncconfig.h]) AH_TOP([#ifndef ZNCCONFIG_H #define ZNCCONFIG_H]) AH_BOTTOM([#endif /* ZNCCONFIG_H */]) diff --git a/Buffer.cpp b/src/Buffer.cpp similarity index 100% rename from Buffer.cpp rename to src/Buffer.cpp diff --git a/Chan.cpp b/src/Chan.cpp similarity index 100% rename from Chan.cpp rename to src/Chan.cpp diff --git a/Client.cpp b/src/Client.cpp similarity index 100% rename from Client.cpp rename to src/Client.cpp diff --git a/ClientCommand.cpp b/src/ClientCommand.cpp similarity index 100% rename from ClientCommand.cpp rename to src/ClientCommand.cpp diff --git a/Config.cpp b/src/Config.cpp similarity index 100% rename from Config.cpp rename to src/Config.cpp diff --git a/Csocket.cpp b/src/Csocket.cpp similarity index 100% rename from Csocket.cpp rename to src/Csocket.cpp diff --git a/FileUtils.cpp b/src/FileUtils.cpp similarity index 100% rename from FileUtils.cpp rename to src/FileUtils.cpp diff --git a/HTTPSock.cpp b/src/HTTPSock.cpp similarity index 100% rename from HTTPSock.cpp rename to src/HTTPSock.cpp diff --git a/IRCNetwork.cpp b/src/IRCNetwork.cpp similarity index 100% rename from IRCNetwork.cpp rename to src/IRCNetwork.cpp diff --git a/IRCSock.cpp b/src/IRCSock.cpp similarity index 100% rename from IRCSock.cpp rename to src/IRCSock.cpp diff --git a/Listener.cpp b/src/Listener.cpp similarity index 100% rename from Listener.cpp rename to src/Listener.cpp diff --git a/MD5.cpp b/src/MD5.cpp similarity index 100% rename from MD5.cpp rename to src/MD5.cpp diff --git a/Modules.cpp b/src/Modules.cpp similarity index 100% rename from Modules.cpp rename to src/Modules.cpp diff --git a/Nick.cpp b/src/Nick.cpp similarity index 100% rename from Nick.cpp rename to src/Nick.cpp diff --git a/SHA256.cpp b/src/SHA256.cpp similarity index 100% rename from SHA256.cpp rename to src/SHA256.cpp diff --git a/Server.cpp b/src/Server.cpp similarity index 100% rename from Server.cpp rename to src/Server.cpp diff --git a/Socket.cpp b/src/Socket.cpp similarity index 100% rename from Socket.cpp rename to src/Socket.cpp diff --git a/Template.cpp b/src/Template.cpp similarity index 100% rename from Template.cpp rename to src/Template.cpp diff --git a/User.cpp b/src/User.cpp similarity index 100% rename from User.cpp rename to src/User.cpp diff --git a/Utils.cpp b/src/Utils.cpp similarity index 100% rename from Utils.cpp rename to src/Utils.cpp diff --git a/WebModules.cpp b/src/WebModules.cpp similarity index 100% rename from WebModules.cpp rename to src/WebModules.cpp diff --git a/ZNCDebug.cpp b/src/ZNCDebug.cpp similarity index 100% rename from ZNCDebug.cpp rename to src/ZNCDebug.cpp diff --git a/ZNCString.cpp b/src/ZNCString.cpp similarity index 100% rename from ZNCString.cpp rename to src/ZNCString.cpp diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/znc.cpp b/src/znc.cpp similarity index 100% rename from znc.cpp rename to src/znc.cpp