Permalink
Browse files

Allow parallel make for building eggdrop

Patch by: thommey

Allows "make -j 9" instead of "make" (cannot use -j with 'make config' or 'make install') to make use of multiple processors.
  • Loading branch information...
thommey authored and vanosg committed Sep 1, 2017
1 parent 0d6d8d5 commit 953824a8f2a6fa6752f13deac9b5f58576a8ccc1
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -22,25 +22,35 @@ dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o \
modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o \
tls.o userent.o userrec.o users.o
MAKE_GENERIC = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)'
MAKE_GENERIC_ARGS = 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)'
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd .. && $(MAKE)
@echo "" && \
echo "Let's try this from the right directory..." && echo "" && \
cd .. && $(MAKE)
../$(EGGEXEC): build_msg $(eggdrop_objs) compile_md5 compatibility
@echo "Linking eggdrop $(EGGBUILD)."
@echo ""
@touch mod/mod.xlibs
linkstart:
@echo "" && echo "This may take a while. Go get some runts." && \
echo "" && \
echo "---------- Yeah! That's the compiling, now the linking! ----------" && \
echo "" && \
echo "Linking eggdrop $(EGGBUILD)." && \
echo "" && \
touch mod/mod.xlibs
link:
$(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs`
$(STRIP) ../$(EGGEXEC)
@echo ""
@echo "Successful compile: $(EGGEXEC)"
@echo ""
linkfinish:
@$(STRIP) ../$(EGGEXEC) && \
echo "" && \
echo "Successful compile: $(EGGEXEC)" && \
echo ""
../$(EGGEXEC): $(eggdrop_objs) compile_md5 compatibility
$(MAKE) linkstart && $(MAKE) link && $(MAKE) linkfinish
$(EGGEXEC): ../$(EGGEXEC)
@@ -50,29 +60,20 @@ depend:
clean:
@rm -f .depend *.o *.a *~
build_msg:
@echo ""
@echo "This may take a while. Go get some runts."
@echo ""
main.o:
$(CC) $(CFLAGS) $(CPPFLAGS) \
'-DCCFLAGS="$(CC) $(CFLAGS) $(CPPFLAGS)"' \
'-DLDFLAGS="$(LD)"' \
'-DSTRIPFLAGS="$(STRIP)"' -c $(srcdir)/main.c
'-DCCFLAGS="$(CC) $(CFLAGS) $(CPPFLAGS)"' \
'-DLDFLAGS="$(LD)"' \
'-DSTRIPFLAGS="$(STRIP)"' -c $(srcdir)/main.c
compatibility:
@cd compat && $(MAKE_GENERIC) compat
@echo ""
@echo "---------- Yeah! That's the compiling, now the linking! ----------"
@echo ""
@cd compat && $(MAKE) $(MAKE_GENERIC_ARGS) compat
compile_md5:
@cd md5 && $(MAKE_GENERIC) md5
@cd md5 && $(MAKE) $(MAKE_GENERIC_ARGS) md5
eggdrop.h:
@echo "You do not have the eggdrop source!"
@exit 1
@echo "You do not have the eggdrop source!" && exit 1
.SUFFIXES:
.SUFFIXES: .c .h .o .a
View
@@ -23,7 +23,7 @@ MOD_CPPFLAGS = @CPPFLAGS@
XLIBS = @XLIBS@
MOD_EXT = @MOD_EXT@
# Note: The following three lines are automatically adjusted by
# Note: The following lines are automatically adjusted by
# misc/modconfig. They have to be present here.
mods =
mod_objs =
@@ -42,14 +42,13 @@ MAKE_MODDEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' \
'CFLAGS=-I../../.. -I../../../src/mod -DMAKING_DEPEND -DHAVE_CONFIG_H -DMAKING_MODS'
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../.. && $(MAKE)
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../.. && $(MAKE)
modules: $(mod_libs)
@echo ""
@echo "All modules compiled."
@echo "" && echo "All modules compiled."
static: $(mod_objs)
@$(modconfig) static.h
@@ -121,8 +120,8 @@ distclean:
install: install-help install-language
install-help:
@echo "Copying module help files."
@if test ! -d $(DEST)/help; then \
@echo "Copying module help files." && \
if test ! -d $(DEST)/help; then \
echo "Creating 'help' subdirectory."; \
$(top_srcdir)/misc/mkinstalldirs $(DEST)/help >/dev/null; \
fi; \
@@ -132,8 +131,8 @@ install-help:
$(INSTALL_DATA) $$h $(DEST)/help/; \
done; \
fi; \
done;
@if test ! -d $(DEST)/help/msg; then \
done; \
if test ! -d $(DEST)/help/msg; then \
echo "Creating 'help/msg' subdirectory."; \
$(top_srcdir)/misc/mkinstalldirs $(DEST)/help/msg >/dev/null; \
fi; \
@@ -143,8 +142,8 @@ install-help:
$(INSTALL_DATA) $$h $(DEST)/help/msg/; \
done; \
fi; \
done;
@if test ! -d $(DEST)/help/set; then \
done; \
if test ! -d $(DEST)/help/set; then \
echo "Creating 'help/set' subdirectory."; \
$(top_srcdir)/misc/mkinstalldirs $(DEST)/help/set >/dev/null; \
fi; \
@@ -157,8 +156,8 @@ install-help:
done;
install-language:
@echo "Copying module language files."
@if test ! -d $(DEST)/language; then \
@echo "Copying module language files." && \
if test ! -d $(DEST)/language; then \
echo "Creating 'language' subdirectory."; \
$(top_srcdir)/misc/mkinstalldirs $(DEST)/language >/dev/null; \
fi; \
View
@@ -4,23 +4,20 @@ srcdir = .
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../ && make
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../../../ && $(MAKE)
static: ../assoc.o
modules: ../../../assoc.$(MOD_EXT)
../assoc.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/assoc.c
@rm -f ../assoc.o
mv assoc.o ../
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/assoc.c && mv -f assoc.o ../
../../../assoc.$(MOD_EXT): ../assoc.o
$(LD) -o ../../../assoc.$(MOD_EXT) ../assoc.o $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../assoc.$(MOD_EXT)
$(LD) -o ../../../assoc.$(MOD_EXT) ../assoc.o $(XLIBS) $(MODULE_XLIBS) && $(STRIP) ../../../assoc.$(MOD_EXT)
depend:
$(CC) $(CFLAGS) -MM $(srcdir)/assoc.c -MT ../assoc.o > .depend
@@ -4,23 +4,20 @@ srcdir = .
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../ && make
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../../../ && $(MAKE)
static: ../blowfish.o
modules: ../../../blowfish.$(MOD_EXT)
../blowfish.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/blowfish.c
@rm -f ../blowfish.o
mv blowfish.o ../
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/blowfish.c && mv -f blowfish.o ../
../../../blowfish.$(MOD_EXT): ../blowfish.o
$(LD) -o ../../../blowfish.$(MOD_EXT) ../blowfish.o $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../blowfish.$(MOD_EXT)
$(LD) -o ../../../blowfish.$(MOD_EXT) ../blowfish.o $(XLIBS) $(MODULE_XLIBS) && $(STRIP) ../../../blowfish.$(MOD_EXT)
depend:
$(CC) $(CFLAGS) -MM $(srcdir)/blowfish.c -MT ../blowfish.o > .depend
@@ -4,23 +4,20 @@ srcdir = .
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../ && make
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../../../ && $(MAKE)
static: ../channels.o
modules: ../../../channels.$(MOD_EXT)
../channels.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/channels.c
@rm -f ../channels.o
mv channels.o ../
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/channels.c && mv -f channels.o ../
../../../channels.$(MOD_EXT): ../channels.o
$(LD) -o ../../../channels.$(MOD_EXT) ../channels.o $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../channels.$(MOD_EXT)
$(LD) -o ../../../channels.$(MOD_EXT) ../channels.o $(XLIBS) $(MODULE_XLIBS) && $(STRIP) ../../../channels.$(MOD_EXT)
depend:
$(CC) $(CFLAGS) -MM $(srcdir)/channels.c -MT ../channels.o > .depend
@@ -5,24 +5,21 @@ srcdir = .
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../ && make
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../../../ && $(MAKE)
static: ../compress.o
@echo "$(ZLIB)" >> ../mod.xlibs
modules: ../../../compress.$(MOD_EXT)
../compress.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/compress.c
rm -f ../compress.o
mv compress.o ../
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/compress.c && mv -f compress.o ../
../../../compress.$(MOD_EXT): ../compress.o
$(LD) -o ../../../compress.$(MOD_EXT) ../compress.o $(ZLIB) $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../compress.$(MOD_EXT)
$(LD) -o ../../../compress.$(MOD_EXT) ../compress.o $(ZLIB) $(XLIBS) $(MODULE_XLIBS) && $(STRIP) ../../../compress.$(MOD_EXT)
depend:
$(CC) $(CFLAGS) -MM $(srcdir)/compress.c -MT ../compress.o > .depend
@@ -4,23 +4,20 @@ srcdir = .
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../ && make
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../../../ && $(MAKE)
static: ../console.o
modules: ../../../console.$(MOD_EXT)
../console.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/console.c
@rm -f ../console.o
mv console.o ../
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/console.c && mv -f console.o ../
../../../console.$(MOD_EXT): ../console.o
$(LD) -o ../../../console.$(MOD_EXT) ../console.o $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../console.$(MOD_EXT)
$(LD) -o ../../../console.$(MOD_EXT) ../console.o $(XLIBS) $(MODULE_XLIBS) && $(STRIP) ../../../console.$(MOD_EXT)
depend:
$(CC) $(CFLAGS) -MM $(srcdir)/console.c -MT ../console.o > .depend
View
@@ -4,23 +4,20 @@ srcdir = .
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../ && make
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../../../ && $(MAKE)
static: ../ctcp.o
modules: ../../../ctcp.$(MOD_EXT)
../ctcp.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/ctcp.c
@rm -f ../ctcp.o
mv ctcp.o ../
$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/ctcp.c && mv -f ctcp.o ../
../../../ctcp.$(MOD_EXT): ../ctcp.o
$(LD) -o ../../../ctcp.$(MOD_EXT) ../ctcp.o $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../ctcp.$(MOD_EXT)
$(LD) -o ../../../ctcp.$(MOD_EXT) ../ctcp.o $(XLIBS) $(MODULE_XLIBS) && $(STRIP) ../../../ctcp.$(MOD_EXT)
depend:
$(CC) $(CFLAGS) -MM $(srcdir)/ctcp.c -MT ../ctcp.o > .depend
@@ -6,24 +6,21 @@ srcdir = .
doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../ && make
@echo "" && \
echo "Let's try this from the right directory..." && \
echo "" && \
cd ../../../ && $(MAKE)
static: ../dns.o
@echo "$(RESLIB)" >> ../mod.xlibs
modules: ../../../dns.$(MOD_EXT)
../dns.o:
$(CC) $(CFLAGS) $(CPPFLAGS) $(RESINCLUDE) -DMAKING_MODS -c $(srcdir)/dns.c
@rm -f ../dns.o
mv dns.o ../
$(CC) $(CFLAGS) $(CPPFLAGS) $(RESINCLUDE) -DMAKING_MODS -c $(srcdir)/dns.c && mv -f dns.o ../
../../../dns.$(MOD_EXT): ../dns.o
$(LD) -o ../../../dns.$(MOD_EXT) ../dns.o $(RESLIB) $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../dns.$(MOD_EXT)
$(LD) -o ../../../dns.$(MOD_EXT) ../dns.o $(RESLIB) $(XLIBS) $(MODULE_XLIBS) && $(STRIP) ../../../dns.$(MOD_EXT)
depend:
$(CC) $(CFLAGS) -MM $(srcdir)/dns.c -MT ../dns.o > .depend
Oops, something went wrong.

0 comments on commit 953824a

Please sign in to comment.