summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:45 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:45 +0200
commit23c5e7d57e1e9216f4da3446656df2dc7202975d (patch)
treeb387afc4ad6acad4681252df8ce8def5dc8aa54d /Makefile
parent9dcec1feba68dc5ba38cdc634f5bf113c0f77348 (diff)
tagging ychat-0.1ychat-0.1
Diffstat (limited to 'Makefile')
-rw-r--r--[-rwxr-xr-x]Makefile95
1 files changed, 12 insertions, 83 deletions
diff --git a/Makefile b/Makefile
index 9e0e9e0..7d5792f 100755..100644
--- a/Makefile
+++ b/Makefile
@@ -1,83 +1,12 @@
-MAKE=`tail -n 1 make.version`
-PREFIX=`grep "define PREFIX" src/glob.h | cut -d'"' -f2`
-all: version base modules
- @echo "Now edit the yhttpd.conf and run yhttpd!"
- @echo "The config file is searched in the following order:"
- @echo " ./yhttpd.conf "
- @echo " ~/.yhttpd/yhttpd.conf "
- @echo " ./etc/yhttpd.conf "
- @echo " /etc/yhttpd.conf "
- @echo " $(PREFIX)/etc/yhttpd.conf "
- @echo If you want to help the yhttpd project please run gmake mail
- @echo so that the developers receive an email about the platform
- @echo being used.
- @echo WARNING! This software is EXPERIMENTAL!
-mail:
- @echo "VERSION:" > mail.tmp
- @${MAKE} version >> mail.tmp
- @echo >> mail.tmp
- @echo "UNAME:" >> mail.tmp
- @uname -a >> mail.tmp
- @echo >> mail.tmp
- @echo "DATE:" >> mail.tmp
- @date >> mail.tmp
- @echo >> mail.tmp
- @echo "COMPILER AND MAKE:" >> mail.tmp
- @cat g++.version make.version >> mail.tmp
- @cat mail.tmp | mail -s "Successfull build of yhttpd" successfullbuild@yChat.org
- @rm -f mail.tmp
-install: deinstall
-uninstall: deinstall
-deinstall:
- @echo Install/deinstall is not supported!
- @echo Start yhttpd with ./bin/yhttpd instead!
- @exit 1
-modules:
- @if test -d ./src/mods; then ${MAKE} -C ./src/mods; fi
-clean_modules:
- @if test -d ./src/mods; then ${MAKE} -C ./src/mods clean; fi
-base:
- @if test -f bin/yhttpd; then echo "Backing up old binary";if test -f bin/yhttpd.old; then rm -f bin/yhttpd.old; fi; mv bin/yhttpd bin/yhttpd.old; fi
- @perl ./scripts/buildnr.pl
- @perl ./scripts/setglobvals.pl
- @${MAKE} -C ./src
-clean_base:
- @${MAKE} -C ./src clean
-stats:
- @perl scripts/stats.pl
-run:
- ./bin/yhttpd
-base_start: base
- ./bin/yhttpd
-gpl:
- @more COPYING
-clean: clean_base clean_modules
-help:
- @echo "You may run ${MAKE} with the following parameters:"
- @grep "^ ${MAKE} " README
- @echo "For more questions read the README file or contact mail@yChat.org!"
-setup:
- @./configure
- @${MAKE}
-config:
- @sh -c "scripts/config.sh"
- @echo If you run ${MAKE} config from the command line then you may need
- @echo to rerun ./configure and recompile all now!
-
-mrproper: clean
- @if test -f src/glob.h.org; then mv -f src/glob.h.org src/glob.h;fi
- @if test -f g++.version; then rm -f g++.version; fi
- @if test -f make.version; then rm -f make.version; fi
- @if test -f src/Makefile; then rm -f src/Makefile; fi
- @if test -f bin/yhttpd; then find bin/ -name "*yhttpd*" | xargs rm -f; fi
- @if test -d src/mods; then find src/mods/*/ -name Makefile | xargs rm -f; fi
- @find . -name "*.add" | xargs rm -f
- @ls | grep core | xargs rm -f
-version:
- @./scripts/version.sh
-debug:
- @gdb bin/yhttpd yhttpd.core
-confdebug:
- ./configure -g3 -ggdb
-dist:
- @./scripts/makedist.sh
+SRCS=base.cpp chat.cpp CHAT.cpp cmnd.cpp conf.cpp CONF.cpp cont.cpp html.cpp HTML.cpp main.cpp mutx.cpp MUTX.cpp name.cpp reqp.cpp room.cpp sock.cpp SOCK.cpp thrd.cpp TOOL.cpp user.cpp
+OBJS=$(SRCS:.cpp=.o)
+CC=c++
+LDFLAGS=-lstdc++
+LDADD=-pthread -D_THREAD_SAFE
+all: ychat
+$(SRCS):
+ $(CC) $(CFLAGS) -c $*.cpp
+ychat: $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDADD)
+clean:
+ rm *.o