2005-03-06 19:27:16 +01:00
|
|
|
# -*- mode: Makefile; -*-
|
2009-02-28 17:15:59 +01:00
|
|
|
# Copyright 2005-2009 by Eric House (xwords@eehouse.org). All rights
|
|
|
|
# reserved.
|
2005-03-06 19:27:16 +01: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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
2008-05-21 05:49:11 +02:00
|
|
|
CXX = g++
|
2007-11-13 04:53:10 +01:00
|
|
|
CC=$(CXX)
|
2005-09-02 08:56:34 +02:00
|
|
|
SRC = xwrelay.cpp \
|
|
|
|
cref.cpp \
|
|
|
|
ctrl.cpp \
|
2009-02-28 17:15:59 +01:00
|
|
|
http.cpp \
|
2005-09-02 08:56:34 +02:00
|
|
|
tpool.cpp \
|
|
|
|
states.cpp \
|
|
|
|
timermgr.cpp \
|
|
|
|
configs.cpp \
|
|
|
|
crefmgr.cpp \
|
2005-10-01 18:33:45 +02:00
|
|
|
permid.cpp \
|
2007-12-01 16:00:30 +01:00
|
|
|
lstnrmgr.cpp \
|
2005-09-02 08:56:34 +02:00
|
|
|
|
2007-11-13 04:53:10 +01:00
|
|
|
# STATIC ?= -static
|
2008-12-31 05:16:55 +01:00
|
|
|
SVNINFO = svnversion.txt
|
2008-12-30 06:17:00 +01:00
|
|
|
|
2007-11-13 04:53:10 +01:00
|
|
|
|
2005-03-30 04:00:15 +02:00
|
|
|
OBJ = $(patsubst %.cpp,%.o,$(SRC))
|
2009-07-28 07:00:18 +02:00
|
|
|
#LDFLAGS += -pthread -g -lmcheck $(STATIC)
|
|
|
|
LDFLAGS += -pthread -g $(STATIC)
|
2009-02-28 17:15:59 +01:00
|
|
|
CPPFLAGS += -DSPAWN_SELF -DRELAY_HEARTBEAT -DDO_HTTP -g -Wall \
|
2008-12-30 06:17:00 +01:00
|
|
|
-DSVN_REV=\"$(shell cat $(SVNINFO) 2>/dev/null || svnversion -n ..)\"
|
|
|
|
|
2005-10-14 10:26:19 +02:00
|
|
|
# turn on semaphore debugging
|
|
|
|
# CPPFLAGS += -DDEBUG_LOCKS
|
2005-03-06 19:27:16 +01:00
|
|
|
|
2005-06-23 06:26:44 +02:00
|
|
|
memdebug all: xwrelay
|
2005-03-06 19:27:16 +01:00
|
|
|
|
2005-03-30 04:00:15 +02:00
|
|
|
xwrelay: $(OBJ)
|
2005-03-06 19:27:16 +01:00
|
|
|
|
|
|
|
clean:
|
2005-03-30 04:00:15 +02:00
|
|
|
rm -f xwrelay $(OBJ)
|
|
|
|
|
|
|
|
tags:
|
|
|
|
etags *.cpp *.h
|
2007-02-04 02:22:31 +01:00
|
|
|
|
|
|
|
tarball:
|
2008-12-30 06:17:00 +01:00
|
|
|
@svnversion -n ../ > $(SVNINFO)
|
2007-02-04 02:22:31 +01:00
|
|
|
tar cvfz RELAY_SRC.tgz \
|
2008-12-31 05:16:55 +01:00
|
|
|
../relay/*.cpp \
|
|
|
|
../relay/*.h \
|
2007-02-04 02:22:31 +01:00
|
|
|
../relay/Makefile \
|
2008-12-30 06:17:00 +01:00
|
|
|
../relay/xwrelay.conf \
|
2008-12-31 05:16:55 +01:00
|
|
|
../relay/xwrelay.sh \
|
2009-02-28 17:15:59 +01:00
|
|
|
../relay/xwrelay.css \
|
2008-12-30 06:17:00 +01:00
|
|
|
../relay/$(SVNINFO)
|
|
|
|
@rm -f $(SVNINFO)
|
|
|
|
@echo "RELAY_SRC.tgz done"
|
2007-11-13 04:53:10 +01:00
|
|
|
|
|
|
|
help:
|
2009-02-21 18:15:09 +01:00
|
|
|
@echo $(MAKE) [STATIC=\"-static\"]
|
|
|
|
@echo $(MAKE) tarball
|