energymech/Makefile

130 lines
4.9 KiB
Makefile
Raw Permalink Normal View History

2014-03-08 19:56:21 -05:00
#
# EnergyMech, IRC Bot software
2025-09-22 16:40:16 +02:00
# Copyright (c) 1997-2025 proton
2014-03-08 19:56:21 -05:00
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
2025-10-24 16:07:16 +02:00
MISCFILES = CREDITS FEATURES LICENSE README README.TCL TODO VERSIONS VERSIONS-2.x Makefile \
configure checkmech sample.conf sample.py sample.tcl sample.userfile \
common/default.bigchars public/README trivia/README
2018-04-02 18:33:49 +02:00
ASCIIFILES = ascii/README ascii/bbw ascii/camel ascii/goatse ascii/mech ascii/phooler
2014-03-08 19:56:21 -05:00
2025-10-24 16:07:16 +02:00
HELPFILES = help/8BALL help/ACCESS help/ALIAS help/AWAY help/BAN help/BANLIST help/BOOT \
help/BYE help/CCHAN help/CHACCESS help/CHANBAN help/CHANNELS help/CHAT \
help/CLEARSHIT help/CMD help/CORE help/CSERV help/CTCP help/CYCLE help/DEBUG \
help/DEOP help/DIE help/DNS help/DNSSERVER help/DO help/DOWN help/ECHO \
help/ESAY help/FEATURES help/FORGET help/GREET help/HELP help/IDLE help/INSULT \
help/INVITE help/JOIN help/KB help/KICK help/KS help/LAST help/LEVELS help/LINK \
help/LOAD help/LUSERS help/ME help/MODE help/MSG help/NAMES help/NEXTSERVER \
help/NICK help/NOTE help/NOTIFY help/ONTIME help/OP help/PART help/PASSWD \
help/PROTECTION help/PYTHON help/PYTHONSCRIPT help/QSHIT help/RAND help/READ \
help/RESET help/RKS help/RSHIT help/RSPY help/RT help/SAVE help/SAY help/SCREW \
help/SEEN help/SERVER help/SERVERGROUP help/SET help/SETAAWAY help/SETAOP \
help/SETAUB help/SETAVOICE help/SETCC help/SETCHANBAN help/SETCKL help/SETDCC \
help/SETENFM help/SETENFMODES help/SETENFPASS help/SETFL help/SETFPL help/SETIKT \
help/SETKS help/SETMAL help/SETMBL help/SETMDL help/SETMKL help/SETMODES \
help/SETMPL help/SETNCL help/SETPASS help/SETPROT help/SETPUB help/SETRK \
help/SETSD help/SETSERVERGROUP help/SETSHIT help/SETSO help/SETSTATS help/SETTOP \
help/SHIT help/SHITLIST help/SHOWIDLE help/SHUTDOWN help/SITEBAN help/SITEKB \
help/SPY help/STATS help/TCL help/TCLSCRIPT help/TIME help/TOPIC help/UNALIAS \
help/UNBAN help/UNVOICE help/UP help/UPTIME help/USAGE help/USER help/USERHOST \
help/USERLIST help/VER help/VERIFY help/VOICE help/WALL help/WHO help/WHOIS help/WHOM
RANDFILES = common/8ball.txt common/away.txt common/insult.txt \
common/kick.txt common/nick.txt common/pickup.txt \
common/say.txt common/signoff.txt common/version.txt
2014-03-08 19:56:21 -05:00
2018-03-16 02:45:13 +01:00
STUBFILES = src/Makefile.in src/config.h.in src/ld/README src/ld/elf32-i386 src/ld/elf64-x86-64
2014-03-08 19:56:21 -05:00
2025-10-22 22:36:24 +02:00
TESTFILES = config/cc.c config/endian.c config/inet_addr.c config/inet_aton.c config/ldtest.c \
config/md5.h config/md5.c config/perl.c config/ptr_size.c config/python.c config/pw.c \
2025-10-24 16:07:16 +02:00
config/sha1.h config/sha1.c config/sha512.c config/socket.c config/tcl.c \
2018-04-02 18:33:49 +02:00
config/unaligned.c config/which
2014-03-08 19:56:21 -05:00
TRIVFILES = trivia/mkindex.c
2025-10-24 16:07:16 +02:00
SRCFILES = src/alias.c src/auth.c src/bounce.c src/calc.c src/channel.c src/core.c src/ctcp.c \
src/debug.c src/dns.c src/function.c src/gencmd.c src/greet.c src/help.c src/hostinfo.c \
src/irc.c src/main.c src/net.c src/note.c src/ons.c src/parse.c src/partyline.c \
src/perl.c src/prot.c src/python.c src/reset.c src/seen.c src/shit.c src/io.c \
src/spy.c src/tcl.c src/toybox.c src/uptime.c src/user.c src/vars.c src/web.c \
2025-11-05 14:31:49 +01:00
src/lib/md5.c src/lib/md5.h src/string.c
2014-03-08 19:56:21 -05:00
2025-10-22 22:36:24 +02:00
HDRFILES = src/commands.h src/defines.h src/global.h src/h.h src/onhash.h src/settings.h \
src/structs.h src/text.h src/usage.h
2014-03-08 19:56:21 -05:00
CONFFILES = src/Makefile src/config.h
2018-04-02 18:33:49 +02:00
DISTFILES = $(MISCFILES) $(RANDFILES) $(SRCFILES) $(HELPFILES) $(ASCIIFILES) \
2014-03-08 19:56:21 -05:00
$(STUBFILES) $(HDRFILES) $(TRIVFILES) $(TESTFILES)
#
# simple make rules
#
2018-04-02 18:33:49 +02:00
.PHONY: clean install mech mega mega-install test dist dist2
2014-03-08 19:56:21 -05:00
mech: $(SRCFILES) $(CONFFILES)
$(MAKE) -C src energymech
energymech: $(SRCFILES) $(CONFFILES)
$(MAKE) -C src energymech
2018-04-02 18:33:49 +02:00
clean:
2014-03-08 19:56:21 -05:00
$(MAKE) -C src clean
2018-04-02 18:33:49 +02:00
install:
2014-03-08 19:56:21 -05:00
$(MAKE) -C src install
2025-11-15 14:48:13 +01:00
@if [ -x test ]; then \
./postfix.sh; \
fi
2014-03-08 19:56:21 -05:00
2018-04-02 18:33:49 +02:00
mega:
2018-03-10 02:55:07 +01:00
$(MAKE) -C src mega
2025-10-24 16:07:16 +02:00
mega-install mi:
2018-03-10 02:55:07 +01:00
$(MAKE) -C src mega-install
2025-11-15 14:48:13 +01:00
@if [ -x test ]; then \
./postfix.sh; \
fi
#
# code validation tests
#
2018-04-02 18:33:49 +02:00
test:
$(MAKE) -C src test
defines:
(gcc -dM -E - < /dev/null) | sort
2014-03-08 19:56:21 -05:00
#
# packing things up for distribution
#
2018-04-02 18:33:49 +02:00
dist:
2014-03-08 19:56:21 -05:00
$(MAKE) dist2 DISTDIR=`sed 's/^.*VERSION.*"\(.*\)".*$$/emech-\1/p; d;' src/global.h`
2018-04-02 18:33:49 +02:00
dist2:
2014-03-08 19:56:21 -05:00
rm -rf /tmp/$(DISTDIR)
mkdir /tmp/$(DISTDIR)
2018-03-16 02:45:13 +01:00
tar cf - $(DISTFILES) | ( cd /tmp/$(DISTDIR) ; tar --preserve-permissions -xf - )
2014-03-08 19:56:21 -05:00
cd /tmp ; tar cf - $(DISTDIR) | gzip -9 > $(DISTDIR).tar.gz
rm -rf /tmp/$(DISTDIR)
chmod 644 /tmp/$(DISTDIR).tar.gz