1999-08-14 01:45:34 +02:00
|
|
|
#
|
|
|
|
# File: Makefile
|
|
|
|
# Creation: August 14, 1999 (Saturday, 01:08h)
|
2006-07-08 10:58:08 +02:00
|
|
|
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
1999-08-14 01:45:34 +02:00
|
|
|
# Format: GNU make
|
2006-07-08 10:58:08 +02:00
|
|
|
# Web Site: http://boxes.thomasjensen.com/
|
1999-08-14 01:45:34 +02:00
|
|
|
# Purpose: Makefile for boxes, the box drawing program
|
|
|
|
#
|
2014-10-07 23:57:44 +02:00
|
|
|
# License: o This program is free software; you can redistribute it and/or
|
1999-08-14 01:45:34 +02:00
|
|
|
# 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.
|
|
|
|
# o 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.
|
|
|
|
# o 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
|
|
|
|
#____________________________________________________________________________
|
|
|
|
#============================================================================
|
|
|
|
|
|
|
|
|
1999-08-22 13:43:55 +02:00
|
|
|
# The following line (GLOBALCONF) is the only line you should need to edit!
|
2006-07-23 18:50:09 +02:00
|
|
|
GLOBALCONF = /usr/share/boxes
|
2015-01-16 22:16:13 +01:00
|
|
|
BVERSION = 1.1.2
|
1999-08-22 01:39:01 +02:00
|
|
|
|
2014-10-07 23:57:44 +02:00
|
|
|
ALL_FILES = LICENSE README.md README.Win32.txt boxes-config
|
|
|
|
DOC_FILES = doc/boxes.1 doc/boxes.el
|
|
|
|
PKG_NAME = boxes-$(BVERSION)
|
|
|
|
|
|
|
|
.PHONY: clean build win32 debug win32.debug infomsg replaceinfos test package win32.package package_common
|
|
|
|
|
1999-08-22 01:39:01 +02:00
|
|
|
|
2014-10-07 23:57:44 +02:00
|
|
|
build debug: infomsg replaceinfos
|
|
|
|
$(MAKE) -C src BOXES_PLATFORM=unix $@
|
1999-08-14 01:45:34 +02:00
|
|
|
|
2014-10-07 23:57:44 +02:00
|
|
|
win32: infomsg replaceinfos
|
|
|
|
$(MAKE) -C src BOXES_PLATFORM=win32 build
|
1999-08-14 01:45:34 +02:00
|
|
|
|
2014-10-07 23:57:44 +02:00
|
|
|
win32.debug: infomsg replaceinfos
|
|
|
|
$(MAKE) -C src BOXES_PLATFORM=win32 debug
|
1999-08-14 01:45:34 +02:00
|
|
|
|
1999-08-22 01:39:01 +02:00
|
|
|
|
2014-10-07 23:57:44 +02:00
|
|
|
infomsg:
|
|
|
|
@echo "| For compilation info please refer to the boxes compilation FAQ"
|
|
|
|
@echo "| at https://github.com/ascii-boxes/boxes/wiki/FAQ#q-5-compilation"
|
|
|
|
|
|
|
|
replaceinfos: src/boxes.h doc/boxes.1
|
|
|
|
|
1999-08-22 01:39:01 +02:00
|
|
|
src/boxes.h: src/boxes.h.in src/regexp/regexp.h Makefile
|
|
|
|
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' src/boxes.h.in > src/boxes.h
|
|
|
|
|
|
|
|
doc/boxes.1: doc/boxes.1.in Makefile
|
|
|
|
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' doc/boxes.1.in > doc/boxes.1
|
|
|
|
|
|
|
|
|
2014-10-07 23:57:44 +02:00
|
|
|
$(PKG_NAME).tar.gz:
|
|
|
|
mkdir -p $(PKG_NAME)/doc
|
|
|
|
cp $(ALL_FILES) $(PKG_NAME)
|
|
|
|
cp $(DOC_FILES) $(PKG_NAME)/doc
|
|
|
|
$(MAKE) -C src PKG_NAME=$(PKG_NAME) BOXES_PLATFORM=$(BOXES_PLATFORM) flags_$(BOXES_PLATFORM) package
|
|
|
|
if which gtar >/dev/null 2>&1 ; then gtar cfvz $(PKG_NAME).tar.gz $(PKG_NAME)/* ; \
|
|
|
|
else tar cfvz $(PKG_NAME).tar.gz $(PKG_NAME)/* ; fi
|
|
|
|
rm -rf $(PKG_NAME)/
|
|
|
|
|
|
|
|
package: build
|
|
|
|
$(MAKE) BOXES_PLATFORM=unix $(PKG_NAME).tar.gz
|
|
|
|
|
|
|
|
win32.package: win32
|
|
|
|
$(MAKE) BOXES_PLATFORM=win32 $(PKG_NAME).tar.gz
|
|
|
|
|
|
|
|
|
1999-08-22 01:39:01 +02:00
|
|
|
clean:
|
2006-07-22 21:51:08 +02:00
|
|
|
rm -f doc/boxes.1 src/boxes.h
|
1999-08-22 01:39:01 +02:00
|
|
|
$(MAKE) -C src clean
|
|
|
|
|
|
|
|
|
2014-09-23 23:50:36 +02:00
|
|
|
test:
|
|
|
|
cd test; ./testrunner.sh -suite
|
|
|
|
|
1999-08-14 01:45:34 +02:00
|
|
|
|
|
|
|
#EOF
|