summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.Makefile.inc1
-rw-r--r--.inspircd.inc4
-rw-r--r--src/Makefile61
3 files changed, 56 insertions, 10 deletions
diff --git a/.Makefile.inc b/.Makefile.inc
index 047415b48..193b071c2 100644
--- a/.Makefile.inc
+++ b/.Makefile.inc
@@ -27,6 +27,7 @@ ircd:
${MAKE} -C src DIRNAME="src" $(MAKEARGS)
bininst:
+ @-cp src/*.so $(BINPATH)
@-cp src/inspircd $(BINPATH)
config:
diff --git a/.inspircd.inc b/.inspircd.inc
index 5900ce9c6..58e1b2316 100644
--- a/.inspircd.inc
+++ b/.inspircd.inc
@@ -15,11 +15,11 @@
# I HATE PERL.. kthxbye
# ---------------------------------------------------
-$ENV{"LD_LIBRARY_PATH"} = $ENV{"LD_LIBRARY_PATH"} . ":/usr/local/lib/mysql:/usr/lib/mysql";
-
my $conffile = "@CONFIG_DIR@/inspircd.conf";
my $binpath = "@BINARY_DIR@";
+$ENV{"LD_LIBRARY_PATH"} = $ENV{"LD_LIBRARY_PATH"} . ":/usr/local/lib/mysql:/usr/lib/mysql:$binpath";
+
# Lets see what they want to do.. Set the variable (Cause i'm a lazy coder)
my $arg = $ARGV[0];
getpidfile();
diff --git a/src/Makefile b/src/Makefile
index adeab47e0..b4195d524 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -7,16 +7,61 @@
CC = im a cheezeball
-SRC_1 = base.cpp inspircd.cpp inspircd_util.cpp inspircd_io.cpp connection.cpp message.cpp commands.cpp dnsqueue.cpp
-SRC_2 = dynamic.cpp users.cpp modules.cpp wildcard.cpp servers.cpp channels.cpp mode.cpp xline.cpp inspstring.cpp dns.cpp
+CXXFLAGS = -I$../include ${FLAGS}
-SRC = $(SRC_1) $(SRC_2)
-OBJS = $(SRC:.cpp=.o)
+all: inspircd
-CXXFLAGS = -I$../../include ${FLAGS}
+inspircd: inspircd.cpp libchannels.so libmode.so libxline.so libinspstring.so libasyncdns.so libbase.so libinspircdutil.so libinspircdio.so libconnection.so libmessage.so libcommands.so libdnsqueue.so libdynamic.so libusers.so libmodules.so libwildcard.so libservers.so
+ $(CXX) -I../include $(FLAGS) -rdynamic -L. inspircd.cpp -o inspircd $(LDLIBS) libchannels.so libmode.so libxline.so libinspstring.so libasyncdns.so libbase.so libinspircdutil.so libinspircdio.so libconnection.so libmessage.so libcommands.so libdnsqueue.so libdynamic.so libusers.so libmodules.so libwildcard.so libservers.so
-all: inspircd
+libchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libchannels.so channels.cpp
+
+libmode.so: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libmode.so mode.cpp
+
+libxline.so: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libxline.so xline.cpp
+
+libinspstring.so: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libinspstring.so inspstring.cpp
+
+libasyncdns.so: dns.cpp ../include/base.h ../include/dns.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libasyncdns.so dns.cpp
+
+libbase.so: base.cpp ../include/base.h
+ $(CC) -I../include $(FLAGS) -shared -o libbase.so base.cpp
+
+libinspircdutil.so: inspircd_util.cpp ../include/base.h ../include/inspircd_util.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libinspircdutil.so inspircd_util.cpp
+
+libinspircdio.so: inspircd_io.cpp ../include/base.h ../include/inspircd_io.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libinspircdio.so inspircd_io.cpp
+
+libconnection.so: connection.cpp ../include/base.h ../include/connection.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libconnection.so connection.cpp
+
+libmessage.so: message.cpp ../include/base.h ../include/message.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libmessage.so message.cpp
+
+libcommands.so: commands.cpp ../include/base.h ../include/commands.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libcommands.so commands.cpp
+
+libdnsqueue.so: dnsqueue.cpp ../include/base.h ../include/dnsqueue.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libdnsqueue.so dnsqueue.cpp
+
+libdynamic.so: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libdynamic.so dynamic.cpp
+
+libusers.so: users.cpp ../include/base.h ../include/users.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libusers.so users.cpp
+
+libmodules.so: modules.cpp ../include/base.h ../include/modules.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libmodules.so modules.cpp
+
+libwildcard.so: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libwildcard.so wildcard.cpp
-inspircd: $(OBJS)
- $(CXX) -rdynamic $^ -o $@ $(LDLIBS)
+libservers.so: servers.cpp ../include/base.h ../include/servers.h ../include/inspircd.h
+ $(CC) -I../include $(FLAGS) -shared -o libservers.so servers.cpp