mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-06-20 17:58:56 +02:00
Consolidated separated Makefiles for Unix and Win32 into one
This commit is contained in:
parent
ef5a5a97ab
commit
001eaeeb57
138
Makefile
138
Makefile
@ -2,13 +2,11 @@
|
|||||||
# File: Makefile
|
# File: Makefile
|
||||||
# Creation: August 14, 1999 (Saturday, 01:08h)
|
# Creation: August 14, 1999 (Saturday, 01:08h)
|
||||||
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
||||||
# Version: $Id: Makefile,v 1.13 2012/10/19 16:46:32 tsjensen Exp $
|
|
||||||
# Format: GNU make
|
# Format: GNU make
|
||||||
# Web Site: http://boxes.thomasjensen.com/
|
# Web Site: http://boxes.thomasjensen.com/
|
||||||
# Platforms: sparc/Solaris 2.6, Linux, and others
|
|
||||||
# Purpose: Makefile for boxes, the box drawing program
|
# Purpose: Makefile for boxes, the box drawing program
|
||||||
#
|
#
|
||||||
# Remarks: o This program is free software; you can redistribute it and/or
|
# License: o This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License as
|
# modify it under the terms of the GNU General Public License as
|
||||||
# published by the Free Software Foundation; either version 2 of
|
# published by the Free Software Foundation; either version 2 of
|
||||||
# the License, or (at your option) any later version.
|
# the License, or (at your option) any later version.
|
||||||
@ -20,61 +18,6 @@
|
|||||||
# License along with this program; if not, write to the Free
|
# License along with this program; if not, write to the Free
|
||||||
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
# MA 02111-1307 USA
|
# MA 02111-1307 USA
|
||||||
#
|
|
||||||
# Revision History:
|
|
||||||
#
|
|
||||||
# $Log: Makefile,v $
|
|
||||||
# Revision 1.13 2012/10/19 16:46:32 tsjensen
|
|
||||||
# Incremented version number to 1.1.1
|
|
||||||
# Include boxes.1.in in the changelog
|
|
||||||
#
|
|
||||||
# Revision 1.12 2006/08/04 20:44:00 tsjensen
|
|
||||||
# Changed the latest snap creation target to adjust to VM build environment
|
|
||||||
#
|
|
||||||
# Revision 1.11 2006/07/23 16:50:09 tsjensen
|
|
||||||
# Updated version number to 1.1
|
|
||||||
# Changed default value of GLOBALCONF to comply with current Linux standards
|
|
||||||
#
|
|
||||||
# Revision 1.10 2006/07/22 19:51:08 tsjensen
|
|
||||||
# Added boxes.h management
|
|
||||||
# Added rcslocks target
|
|
||||||
# Updated some of the administrative paths (not relevant for builders)
|
|
||||||
#
|
|
||||||
# Revision 1.9 2006-07-11 23:43:00-07 tsjensen
|
|
||||||
# Added a missing tab character
|
|
||||||
#
|
|
||||||
# Revision 1.8 2006-07-08 01:58:08-07 tsjensen
|
|
||||||
# Updated email and web addresses
|
|
||||||
#
|
|
||||||
# Revision 1.7 2006/07/08 08:56:38 tsjensen
|
|
||||||
# Added reminder of compilation faq
|
|
||||||
# Changed BVERSION to 1.0.2
|
|
||||||
#
|
|
||||||
# Revision 1.6 2000/04/01 18:29:17 tsjensen
|
|
||||||
# Added code to add snapshot info to version number for snapshots. This
|
|
||||||
# affects the author only.
|
|
||||||
#
|
|
||||||
# Revision 1.5 2000/03/17 23:52:29 tsjensen
|
|
||||||
# Incremented version number to 1.0.1
|
|
||||||
# Renamed snapshot file name to boxes-SNAP-latest
|
|
||||||
# Added README.Win32.txt to snapshot generation commands
|
|
||||||
#
|
|
||||||
# Revision 1.4 1999/08/22 11:43:55 tsjensen
|
|
||||||
# Added comment to guide user to GLOBALCONF definition line
|
|
||||||
#
|
|
||||||
# Revision 1.3 1999/08/21 23:39:01 tsjensen
|
|
||||||
# Added GLOBALCONF and BVERSION macros whose values are put into boxes.h and
|
|
||||||
# boxes.1
|
|
||||||
# Added locsnap target for generation of archives without posting to the Web
|
|
||||||
# page
|
|
||||||
# Added README file
|
|
||||||
# Added rules to generate boxes.h and boxes.1 from boxes.1.in and boxes.h.in
|
|
||||||
#
|
|
||||||
# Revision 1.2 1999/08/14 19:01:31 tsjensen
|
|
||||||
# After taking a snapshot, put it in the author's archives, too.
|
|
||||||
#
|
|
||||||
# Revision 1.1 1999/08/13 23:45:34 tsjensen
|
|
||||||
# Initial revision
|
|
||||||
#____________________________________________________________________________
|
#____________________________________________________________________________
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
||||||
@ -83,21 +26,28 @@
|
|||||||
GLOBALCONF = /usr/share/boxes
|
GLOBALCONF = /usr/share/boxes
|
||||||
BVERSION = 1.1.1
|
BVERSION = 1.1.1
|
||||||
|
|
||||||
SNAPFILE = boxes-SNAP-$(shell date +%Y%m%d)
|
ALL_FILES = LICENSE README.md README.Win32.txt boxes-config
|
||||||
WEBHOME = $(HOME)/boxes/website
|
DOC_FILES = doc/boxes.1 doc/boxes.el
|
||||||
CLOGFILE = $(WEBHOME)/changelogs.shtml
|
PKG_NAME = boxes-$(BVERSION)
|
||||||
|
|
||||||
CL_FILES = boxes-config doc/boxes.1.in
|
.PHONY: clean build win32 debug win32.debug infomsg replaceinfos test package win32.package package_common
|
||||||
RCS_FILES = $(CL_FILES) Makefile doc/boxes.el doc/create_changelog.pl
|
|
||||||
ALL_FILES = COPYING README README.Win32.txt boxes-config Makefile
|
|
||||||
DOC_FILES = doc/boxes.1 doc/boxes.1.in doc/boxes.el
|
|
||||||
|
|
||||||
.PHONY: clean build debug locsnap rcstest rcslocks love test
|
|
||||||
|
|
||||||
build debug boxes: src/boxes.h doc/boxes.1
|
build debug: infomsg replaceinfos
|
||||||
@echo For compilation info see the boxes website at http://boxes.thomasjensen.com/
|
$(MAKE) -C src BOXES_PLATFORM=unix $@
|
||||||
$(MAKE) -C src $@
|
|
||||||
|
|
||||||
|
win32: infomsg replaceinfos
|
||||||
|
$(MAKE) -C src BOXES_PLATFORM=win32 build
|
||||||
|
|
||||||
|
win32.debug: infomsg replaceinfos
|
||||||
|
$(MAKE) -C src BOXES_PLATFORM=win32 debug
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
src/boxes.h: src/boxes.h.in src/regexp/regexp.h Makefile
|
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
|
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' src/boxes.h.in > src/boxes.h
|
||||||
@ -106,47 +56,29 @@ doc/boxes.1: doc/boxes.1.in Makefile
|
|||||||
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' doc/boxes.1.in > doc/boxes.1
|
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' doc/boxes.1.in > doc/boxes.1
|
||||||
|
|
||||||
|
|
||||||
|
$(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
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f doc/boxes.1 src/boxes.h
|
rm -f doc/boxes.1 src/boxes.h
|
||||||
$(MAKE) -C src clean
|
$(MAKE) -C src clean
|
||||||
|
|
||||||
locsnap: $(ALL_FILES) $(DOC_FILES)
|
|
||||||
mkdir -p $(SNAPFILE)/doc
|
|
||||||
cp $(ALL_FILES) $(SNAPFILE)
|
|
||||||
cp $(DOC_FILES) $(SNAPFILE)/doc
|
|
||||||
$(MAKE) -C src SNAPFILE=../$(SNAPFILE) snap
|
|
||||||
mv $(SNAPFILE)/Makefile $(SNAPFILE)/Makefile.vin
|
|
||||||
cat $(SNAPFILE)/Makefile.vin | perl -ne 'if (/^(BVERSION\s*=\s*)(.*)$$/) { print "BVERSION = above $$2 (SNAP of '`date +%d-%b-%Y`')\n"; } else { print $$_; }' > $(SNAPFILE)/Makefile
|
|
||||||
rm -f $(SNAPFILE)/Makefile.vin
|
|
||||||
find $(SNAPFILE) -type f -print | xargs chmod 644
|
|
||||||
gtar cfvz $(SNAPFILE).tar.gz $(SNAPFILE)/*
|
|
||||||
rm -rf $(SNAPFILE)/
|
|
||||||
|
|
||||||
snap: locsnap
|
|
||||||
mv -i $(SNAPFILE).tar.gz archive/
|
|
||||||
chmod 444 archive/$(SNAPFILE).tar.gz
|
|
||||||
rm -f archive/boxes-SNAP-latest.tar.gz
|
|
||||||
(cd archive; ln -s $(SNAPFILE).tar.gz boxes-SNAP-latest.tar.gz)
|
|
||||||
|
|
||||||
rcstest:
|
|
||||||
-for i in $(RCS_FILES) ; do rcsdiff $$i ; done
|
|
||||||
$(MAKE) -C src rcstest
|
|
||||||
|
|
||||||
rcslocks:
|
|
||||||
@echo Locked files:
|
|
||||||
@rlog -L -R $(RCS_FILES) | sed -e 's/^/ - /'
|
|
||||||
@$(MAKE) -C src rcslocks
|
|
||||||
|
|
||||||
logpage: $(CL_FILES)
|
|
||||||
cd src; ../doc/create_changelog.pl $(patsubst %,../%,$(CL_FILES)) $(shell $(MAKE) -C src -s logpage) > $(CLOGFILE)
|
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cd test; ./testrunner.sh -suite
|
cd test; ./testrunner.sh -suite
|
||||||
|
|
||||||
love:
|
|
||||||
@echo "Not in front of the kids, honey!"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#EOF
|
#EOF
|
||||||
|
150
src/Makefile
150
src/Makefile
@ -1,14 +1,14 @@
|
|||||||
#
|
#
|
||||||
# File: Makefile
|
# File: Makefile.Win32
|
||||||
# Creation: March 18, 1999 (Thursday, 15:10h)
|
# Creation: March 18, 1999 (Thursday, 15:10h)
|
||||||
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
||||||
# Version: $Id: Makefile,v 1.19 2006/07/22 19:07:21 tsjensen Exp $
|
# Win32 Modifications by Ron Aaron <ron@mossbayeng.com>
|
||||||
# Format: GNU make
|
# Format: GNU make
|
||||||
# Web Site: http://boxes.thomasjensen.com/
|
# Web Site: http://boxes.thomasjensen.com/
|
||||||
# Platforms: sparc/Solaris 2.6 and others
|
# Platforms: win32
|
||||||
# Purpose: Makefile for boxes, the box drawing program
|
# Purpose: Makefile for boxes, the box drawing program
|
||||||
#
|
#
|
||||||
# Remarks: o This program is free software; you can redistribute it and/or
|
# License: o This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License as
|
# modify it under the terms of the GNU General Public License as
|
||||||
# published by the Free Software Foundation; either version 2 of
|
# published by the Free Software Foundation; either version 2 of
|
||||||
# the License, or (at your option) any later version.
|
# the License, or (at your option) any later version.
|
||||||
@ -20,65 +20,6 @@
|
|||||||
# License along with this program; if not, write to the Free
|
# License along with this program; if not, write to the Free
|
||||||
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
# MA 02111-1307 USA
|
# MA 02111-1307 USA
|
||||||
#
|
|
||||||
# Revision History:
|
|
||||||
#
|
|
||||||
# $Log: Makefile,v $
|
|
||||||
# Revision 1.19 2006/07/22 19:07:21 tsjensen
|
|
||||||
# The file boxes.h is now managed by the top level Makefile only
|
|
||||||
# Added rcslocks target to check lock status
|
|
||||||
# Small usability enhancements
|
|
||||||
#
|
|
||||||
# Revision 1.18 2006/07/12 05:32:10 tsjensen
|
|
||||||
# Updated email and web addresses in comment header
|
|
||||||
#
|
|
||||||
# Revision 1.17 2000-03-17 15:51:43-08 tsjensen
|
|
||||||
# Added Makefile.Win32 and misc/* to snap generation commands
|
|
||||||
#
|
|
||||||
# Revision 1.16 1999/11/08 10:55:13 tsjensen
|
|
||||||
# Moved config.h into ORIG_HDRCL group, so it appears in the change log Web
|
|
||||||
# page
|
|
||||||
#
|
|
||||||
# Revision 1.15 1999/08/21 23:35:44 tsjensen
|
|
||||||
# boxes.h is now generated from boxes.h.in by top level Makefile
|
|
||||||
# Added -Wall -W to CFLAGS and removed .c.o rule
|
|
||||||
#
|
|
||||||
# Revision 1.14 1999/08/21 16:10:41 tsjensen
|
|
||||||
# Removed case insensitivity option (-i) from flex call (-> lexer.l)
|
|
||||||
#
|
|
||||||
# Revision 1.13 1999/08/13 23:55:03 tsjensen
|
|
||||||
# Given regexp stuff its own Makefile in regexp.
|
|
||||||
# Major Makefile overhaul, maily implementation of new directory structure
|
|
||||||
# and consolidation of file macros
|
|
||||||
# Use more GNU make features
|
|
||||||
#
|
|
||||||
# Revision 1.12 1999/07/20 18:49:58 tsjensen
|
|
||||||
# Added GNU GPL disclaimer
|
|
||||||
# Now evaluating date command from SNAPFILE only once
|
|
||||||
# Changed order of files in snapshot archive (who cares)
|
|
||||||
#
|
|
||||||
# Revision 1.11 1999/07/12 18:28:53 tsjensen
|
|
||||||
# Removed --yacc option from bison call
|
|
||||||
# Added logpage target to generate the chronologically sorted global change
|
|
||||||
# log in HTML format. This requires a Perl script (create_changelog.pl).
|
|
||||||
# Added config.h to dependencies and stuff
|
|
||||||
# Removed special targets for yacc and lex files. Thanks to Andreas Heiduk,
|
|
||||||
# it is now possible to compile all files with -W -Wall and no extra
|
|
||||||
# defines.
|
|
||||||
# Moved regexp library to a subdirectory regexp
|
|
||||||
# Some modifications on the source file macros which now differentiate
|
|
||||||
# between files which are listed in the HTML change log and files which
|
|
||||||
# aren't.
|
|
||||||
#
|
|
||||||
# Revision 1.10 1999/07/02 11:50:35 tsjensen
|
|
||||||
# Added parser.h header file for lexer-parser communication
|
|
||||||
# Moved from yacc to GNU "bison --yacc"
|
|
||||||
# No longer linking with flex library
|
|
||||||
# Activated -Wall -W for parser.y
|
|
||||||
# Removed -DYY_NO_UNPUT from lexer compilation (now done via file option)
|
|
||||||
#
|
|
||||||
# Revision 1.1 1999/03/18 15:10:41 tsjensen
|
|
||||||
# Initial revision
|
|
||||||
#____________________________________________________________________________
|
#____________________________________________________________________________
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
||||||
@ -86,10 +27,8 @@
|
|||||||
LEX = flex
|
LEX = flex
|
||||||
YACC = bison
|
YACC = bison
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -ansi -I. -Iregexp -Wall -W $(CFLAGS_ADDTL)
|
|
||||||
LDFLAGS = -Lregexp
|
|
||||||
|
|
||||||
GEN_HDR = parser.h
|
GEN_HDR = parser.h boxes.h
|
||||||
GEN_SRC = parser.c lex.yy.c
|
GEN_SRC = parser.c lex.yy.c
|
||||||
GEN_FILES = $(GEN_SRC) $(GEN_HDR)
|
GEN_FILES = $(GEN_SRC) $(GEN_HDR)
|
||||||
ORIG_HDRCL = boxes.h.in config.h
|
ORIG_HDRCL = boxes.h.in config.h
|
||||||
@ -100,31 +39,50 @@ ORIG_SRC = $(ORIG_GEN) $(ORIG_NORM)
|
|||||||
ORIG_FILES = $(ORIG_SRC) $(ORIG_HDR)
|
ORIG_FILES = $(ORIG_SRC) $(ORIG_HDR)
|
||||||
OTH_FILES = Makefile
|
OTH_FILES = Makefile
|
||||||
|
|
||||||
ALL_CL = $(ORIG_SRC) $(ORIG_HDRCL) $(OTH_FILES)
|
ALL_FILES = $(ORIG_FILES) $(GEN_FILES) $(OTH_FILES)
|
||||||
ALL_FILES = $(ORIG_FILES) $(GEN_FILES) $(OTH_FILES) boxes.h
|
|
||||||
ALL_OBJ = $(GEN_SRC:.c=.o) $(ORIG_NORM:.c=.o)
|
|
||||||
|
|
||||||
|
|
||||||
build:
|
.PHONY: clean build debug package flags_unix flags_win32 flags_
|
||||||
$(MAKE) CFLAGS_ADDTL=-O boxes
|
|
||||||
strip boxes
|
|
||||||
debug:
|
build: flags_$(BOXES_PLATFORM)
|
||||||
$(MAKE) CFLAGS_ADDTL=-g boxes
|
$(MAKE) BOXES_PLATFORM=$(BOXES_PLATFORM) ALL_OBJ="$(ALL_OBJ)" CFLAGS_ADDTL=-O STRIP=true flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME)
|
||||||
|
|
||||||
|
debug: flags_$(BOXES_PLATFORM)
|
||||||
|
$(MAKE) BOXES_PLATFORM=$(BOXES_PLATFORM) ALL_OBJ="$(ALL_OBJ)" CFLAGS_ADDTL=-g STRIP=false flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME)
|
||||||
|
|
||||||
boxes: $(ALL_OBJ)
|
boxes: $(ALL_OBJ)
|
||||||
$(MAKE) -C regexp CC=$(CC) libregexp.a
|
$(MAKE) -C regexp CC=$(CC) libregexp.a
|
||||||
$(CC) $(LDFLAGS) $(ALL_OBJ) -o boxes -lregexp
|
$(CC) $(LDFLAGS) $(ALL_OBJ) -o $(BOXES_EXECUTABLE_NAME) -lregexp
|
||||||
|
if [ $(STRIP) == true ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
|
||||||
|
|
||||||
boxes.h:
|
boxes.exe: $(ALL_OBJ)
|
||||||
@echo File boxes.h not found or not current. Please run make in the parent directory.
|
$(CC) $(LDFLAGS) $(ALL_OBJ) -o $(BOXES_EXECUTABLE_NAME) -lkernel32
|
||||||
@exit 1
|
if [ $(STRIP) == true ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
|
||||||
|
|
||||||
|
|
||||||
|
flags_unix:
|
||||||
|
$(eval CFLAGS := -ansi -I. -Iregexp -Wall -W $(CFLAGS_ADDTL))
|
||||||
|
$(eval LDFLAGS := -Lregexp)
|
||||||
|
$(eval BOXES_EXECUTABLE_NAME := boxes)
|
||||||
|
$(eval ALL_OBJ := $(GEN_SRC:.c=.o) $(ORIG_NORM:.c=.o))
|
||||||
|
|
||||||
|
flags_win32:
|
||||||
|
$(eval CFLAGS := -Os -s -m32 -I. -Iregexp -Wall -W $(CFLAGS_ADDTL))
|
||||||
|
$(eval LDFLAGS := -s -m32)
|
||||||
|
$(eval BOXES_EXECUTABLE_NAME := boxes.exe)
|
||||||
|
$(eval ALL_OBJ := $(GEN_SRC:.c=.o) $(ORIG_NORM:.c=.o) regexp/regexp.o regexp/regsub.o misc/getopt.o)
|
||||||
|
|
||||||
|
flags_:
|
||||||
|
@echo Please call make from the top level directory.
|
||||||
|
exit 1
|
||||||
|
|
||||||
parser.c parser.h: parser.y boxes.h regexp/regexp.h
|
parser.c parser.h: parser.y boxes.h regexp/regexp.h
|
||||||
$(YACC) -o parser.c -d parser.y
|
$(YACC) -o parser.c -d parser.y
|
||||||
|
|
||||||
lex.yy.c: lexer.l boxes.h
|
lex.yy.c: lexer.l boxes.h
|
||||||
$(LEX) -t lexer.l > lexer.tmp.c
|
$(LEX) -t lexer.l > lexer.tmp.c
|
||||||
echo '#include "config.h"' > lex.yy.c
|
echo #include "config.h" > lex.yy.c
|
||||||
cat lexer.tmp.c >> lex.yy.c
|
cat lexer.tmp.c >> lex.yy.c
|
||||||
rm lexer.tmp.c
|
rm lexer.tmp.c
|
||||||
|
|
||||||
@ -136,38 +94,20 @@ generate.o: generate.c generate.h boxes.h shape.h tools.h config.h
|
|||||||
remove.o: remove.c remove.h boxes.h shape.h tools.h config.h
|
remove.o: remove.c remove.h boxes.h shape.h tools.h config.h
|
||||||
lex.yy.o: lex.yy.c parser.h tools.h shape.h lexer.h config.h
|
lex.yy.o: lex.yy.c parser.h tools.h shape.h lexer.h config.h
|
||||||
parser.o: parser.c parser.h tools.h shape.h lexer.h config.h
|
parser.o: parser.c parser.h tools.h shape.h lexer.h config.h
|
||||||
|
regexp/regexp.o: regexp/regexp.c
|
||||||
|
regexp/regsub.o: regexp/regsub.c
|
||||||
|
misc/getopt.o: misc/getopt.c
|
||||||
|
|
||||||
|
|
||||||
snap: $(ALL_FILES)
|
package: $(BOXES_EXECUTABLE_NAME)
|
||||||
@if [ -z "$(SNAPFILE)" ] ; then echo "make snap must be run from the parent directory" ; exit 1 ; fi
|
if [ -z "$(PKG_NAME)" ] ; then exit 1 ; fi
|
||||||
mkdir $(SNAPFILE)/src
|
cp $(BOXES_EXECUTABLE_NAME) ../$(PKG_NAME)
|
||||||
cp $(ALL_FILES) $(SNAPFILE)/src
|
|
||||||
cp Makefile.Win32 $(SNAPFILE)/src
|
|
||||||
mkdir $(SNAPFILE)/src/misc
|
|
||||||
cp misc/getopt.c misc/getopt.h $(SNAPFILE)/src/misc
|
|
||||||
touch $(patsubst %,$(SNAPFILE)/src/%,$(GEN_FILES))
|
|
||||||
$(MAKE) -C regexp SNAPFILE=../$(SNAPFILE) snap
|
|
||||||
|
|
||||||
rcstest:
|
clean: flags_unix
|
||||||
-for i in $(ORIG_FILES) $(OTH_FILES) ; do rcsdiff $$i ; done
|
|
||||||
$(MAKE) -C regexp rcstest
|
|
||||||
|
|
||||||
rcslocks:
|
|
||||||
@rlog -L -R $(ORIG_FILES) $(OTH_FILES) | sed -e 's/^/ - src\//'
|
|
||||||
@$(MAKE) -C regexp rcslocks
|
|
||||||
|
|
||||||
logpage: $(ALL_CL)
|
|
||||||
@echo $(ALL_CL) $(shell $(MAKE) -C regexp -s logpage)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(ALL_OBJ)
|
rm -f $(ALL_OBJ)
|
||||||
rm -f $(GEN_FILES)
|
rm -f $(GEN_FILES)
|
||||||
rm -f core boxes
|
rm -f core boxes boxes.exe
|
||||||
$(MAKE) -C regexp clean
|
$(MAKE) -C regexp clean
|
||||||
|
|
||||||
love:
|
|
||||||
@echo "Not in front of the kids, honey!"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#EOF
|
#EOF
|
||||||
|
@ -1,160 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile.Win32
|
|
||||||
# Creation: March 18, 1999 (Thursday, 15:10h)
|
|
||||||
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
|
||||||
# Win32 Modifications by Ron Aaron <ron@mossbayeng.com>
|
|
||||||
# Version: $Id: Makefile,v 1.16 1999/11/08 10:55:13 tsjensen Exp tsjensen $
|
|
||||||
# Format: GNU make
|
|
||||||
# Web Site: http://boxes.thomasjensen.com/
|
|
||||||
# Platforms: win32
|
|
||||||
# Purpose: Makefile for boxes, the box drawing program
|
|
||||||
#
|
|
||||||
# Remarks: o 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.
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
# Revision History:
|
|
||||||
#
|
|
||||||
# $Log: Makefile,v $
|
|
||||||
# Revision 1.17 2000/03/16 10:55:13 ronaaron
|
|
||||||
# Win32 port
|
|
||||||
#
|
|
||||||
# Revision 1.16 1999/11/08 10:55:13 tsjensen
|
|
||||||
# Moved config.h into ORIG_HDRCL group, so it appears in the change log Web
|
|
||||||
# page
|
|
||||||
#
|
|
||||||
# Revision 1.15 1999/08/21 23:35:44 tsjensen
|
|
||||||
# boxes.h is now generated from boxes.h.in by top level Makefile
|
|
||||||
# Added -Wall -W to CFLAGS and removed .c.o rule
|
|
||||||
#
|
|
||||||
# Revision 1.14 1999/08/21 16:10:41 tsjensen
|
|
||||||
# Removed case insensitivity option (-i) from flex call (-> lexer.l)
|
|
||||||
#
|
|
||||||
# Revision 1.13 1999/08/13 23:55:03 tsjensen
|
|
||||||
# Given regexp stuff its own Makefile in regexp.
|
|
||||||
# Major Makefile overhaul, maily implementation of new directory structure
|
|
||||||
# and consolidation of file macros
|
|
||||||
# Use more GNU make features
|
|
||||||
#
|
|
||||||
# Revision 1.12 1999/07/20 18:49:58 tsjensen
|
|
||||||
# Added GNU GPL disclaimer
|
|
||||||
# Now evaluating date command from SNAPFILE only once
|
|
||||||
# Changed order of files in snapshot archive (who cares)
|
|
||||||
#
|
|
||||||
# Revision 1.11 1999/07/12 18:28:53 tsjensen
|
|
||||||
# Removed --yacc option from bison call
|
|
||||||
# Added logpage target to generate the chronologically sorted global change
|
|
||||||
# log in HTML format. This requires a Perl script (create_changelog.pl).
|
|
||||||
# Added config.h to dependencies and stuff
|
|
||||||
# Removed special targets for yacc and lex files. Thanks to Andreas Heiduk,
|
|
||||||
# it is now possible to compile all files with -W -Wall and no extra
|
|
||||||
# defines.
|
|
||||||
# Moved regexp library to a subdirectory regexp
|
|
||||||
# Some modifications on the source file macros which now differentiate
|
|
||||||
# between files which are listed in the HTML change log and files which
|
|
||||||
# aren't.
|
|
||||||
#
|
|
||||||
# Revision 1.10 1999/07/02 11:50:35 tsjensen
|
|
||||||
# Added parser.h header file for lexer-parser communication
|
|
||||||
# Moved from yacc to GNU "bison --yacc"
|
|
||||||
# No longer linking with flex library
|
|
||||||
# Activated -Wall -W for parser.y
|
|
||||||
# Removed -DYY_NO_UNPUT from lexer compilation (now done via file option)
|
|
||||||
#
|
|
||||||
# Revision 1.1 1999/03/18 15:10:41 tsjensen
|
|
||||||
# Initial revision
|
|
||||||
#____________________________________________________________________________
|
|
||||||
#============================================================================
|
|
||||||
|
|
||||||
|
|
||||||
LEX = flex
|
|
||||||
YACC = bison
|
|
||||||
CC = gcc
|
|
||||||
CFLAGS = -Os -s -I. -Iregexp -Wall -W $(CFLAGS_ADDTL)
|
|
||||||
LDFLAGS = -s
|
|
||||||
|
|
||||||
GEN_HDR = parser.h boxes.h
|
|
||||||
GEN_SRC = parser.c lex.yy.c
|
|
||||||
GEN_FILES = $(GEN_SRC) $(GEN_HDR)
|
|
||||||
ORIG_HDRCL = boxes.h.in config.h
|
|
||||||
ORIG_HDR = $(ORIG_HDRCL) lexer.h tools.h shape.h generate.h remove.h
|
|
||||||
ORIG_GEN = lexer.l parser.y
|
|
||||||
ORIG_NORM = boxes.c tools.c shape.c generate.c remove.c
|
|
||||||
ORIG_SRC = $(ORIG_GEN) $(ORIG_NORM)
|
|
||||||
ORIG_FILES = $(ORIG_SRC) $(ORIG_HDR)
|
|
||||||
OTH_FILES = Makefile
|
|
||||||
|
|
||||||
ALL_CL = $(ORIG_SRC) $(ORIG_HDRCL) $(OTH_FILES)
|
|
||||||
ALL_FILES = $(ORIG_FILES) $(GEN_FILES) $(OTH_FILES)
|
|
||||||
ALL_OBJ = $(GEN_SRC:.c=.o) $(ORIG_NORM:.c=.o) regexp/regexp.o \
|
|
||||||
regexp/regsub.o misc/getopt.o
|
|
||||||
|
|
||||||
|
|
||||||
boxes: $(ALL_OBJ)
|
|
||||||
$(CC) $(LDFLAGS) $(ALL_OBJ) -o boxes -lkernel32
|
|
||||||
|
|
||||||
parser.c parser.h: parser.y boxes.h regexp/regexp.h
|
|
||||||
$(YACC) -o parser.c -d parser.y
|
|
||||||
|
|
||||||
lex.yy.c: lexer.l boxes.h
|
|
||||||
$(LEX) -t lexer.l > lexer.tmp.c
|
|
||||||
echo #include "config.h" > lex.yy.c
|
|
||||||
cat lexer.tmp.c >> lex.yy.c
|
|
||||||
rm lexer.tmp.c
|
|
||||||
|
|
||||||
|
|
||||||
boxes.o: boxes.c boxes.h regexp/regexp.h shape.h tools.h generate.h remove.h config.h
|
|
||||||
tools.o: tools.c tools.h boxes.h shape.h config.h
|
|
||||||
shape.o: shape.c shape.h boxes.h config.h tools.h
|
|
||||||
generate.o: generate.c generate.h boxes.h shape.h tools.h config.h
|
|
||||||
remove.o: remove.c remove.h boxes.h shape.h tools.h config.h
|
|
||||||
lex.yy.o: lex.yy.c parser.h tools.h shape.h lexer.h config.h
|
|
||||||
parser.o: parser.c parser.h tools.h shape.h lexer.h config.h
|
|
||||||
regexp/regexp.o: regexp/regexp.c
|
|
||||||
regexp/regsub.o: regexp/regsub.c
|
|
||||||
misc/getopt.o: misc/getopt.c
|
|
||||||
|
|
||||||
|
|
||||||
snap: $(ALL_FILES)
|
|
||||||
if [ -z "$(SNAPFILE)" ] ; then exit 1 ; fi
|
|
||||||
mkdir $(SNAPFILE)/src
|
|
||||||
cp $(ALL_FILES) $(SNAPFILE)/src
|
|
||||||
touch $(patsubst %,$(SNAPFILE)/src/%,$(GEN_FILES))
|
|
||||||
$(MAKE) -C regexp SNAPFILE=../$(SNAPFILE) snap
|
|
||||||
|
|
||||||
rcstest:
|
|
||||||
-for i in $(ORIG_FILES) $(OTH_FILES) ; do rcsdiff $$i ; done
|
|
||||||
$(MAKE) -C regexp rcstest
|
|
||||||
|
|
||||||
logpage: $(ALL_CL)
|
|
||||||
@echo $(ALL_CL) $(shell $(MAKE) -C regexp -s logpage)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(ALL_OBJ)
|
|
||||||
rm -f $(GEN_FILES)
|
|
||||||
rm -f core boxes
|
|
||||||
$(MAKE) -C regexp clean
|
|
||||||
|
|
||||||
love:
|
|
||||||
@echo "Not in front of the kids, honey!"
|
|
||||||
|
|
||||||
boxes.h: boxes.h.in
|
|
||||||
cp boxes.h.in boxes.h
|
|
||||||
|
|
||||||
build:
|
|
||||||
$(MAKE) CFLAGS_ADDTL=-O boxes
|
|
||||||
strip boxes
|
|
||||||
|
|
||||||
debug:
|
|
||||||
$(MAKE) CFLAGS_ADDTL=-g boxes
|
|
||||||
|
|
||||||
#EOF
|
|
5
src/misc/README.misc.md
Normal file
5
src/misc/README.misc.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
###getopt Library
|
||||||
|
|
||||||
|
This is used only for the Win32 build.
|
||||||
|
|
||||||
|
Used under the terms of the GPL. For license information, see source file headers.
|
@ -2,14 +2,12 @@
|
|||||||
# File: Makefile
|
# File: Makefile
|
||||||
# Creation: August 13, 1999 (Friday, 22:13h)
|
# Creation: August 13, 1999 (Friday, 22:13h)
|
||||||
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
# Author: Copyright (C) 1999 Thomas Jensen <boxes@thomasjensen.com>
|
||||||
# Version: $Id: Makefile,v 1.4 2006/07/22 19:04:30 tsjensen Exp $
|
|
||||||
# Format: GNU make
|
# Format: GNU make
|
||||||
# Web Site: http://boxes.thomasjensen.com/
|
# Web Site: http://boxes.thomasjensen.com/
|
||||||
# Platforms: sparc/Solaris 2.6 and others
|
|
||||||
# Purpose: Makefile for boxes, the box drawing program
|
# Purpose: Makefile for boxes, the box drawing program
|
||||||
# generation of regexp handling library
|
# generation of regexp handling library
|
||||||
#
|
#
|
||||||
# Remarks: o This program is free software; you can redistribute it and/or
|
# License: o This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License as
|
# modify it under the terms of the GNU General Public License as
|
||||||
# published by the Free Software Foundation; either version 2 of
|
# published by the Free Software Foundation; either version 2 of
|
||||||
# the License, or (at your option) any later version.
|
# the License, or (at your option) any later version.
|
||||||
@ -21,23 +19,6 @@
|
|||||||
# License along with this program; if not, write to the Free
|
# License along with this program; if not, write to the Free
|
||||||
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
# MA 02111-1307 USA
|
# MA 02111-1307 USA
|
||||||
#
|
|
||||||
# Revision History:
|
|
||||||
#
|
|
||||||
# $Log: Makefile,v $
|
|
||||||
# Revision 1.4 2006/07/22 19:04:30 tsjensen
|
|
||||||
# Small usability enhancements
|
|
||||||
#
|
|
||||||
# Revision 1.3 2006/07/12 21:28:38 tsjensen
|
|
||||||
# Added target rcslocks
|
|
||||||
#
|
|
||||||
# Revision 1.2 2006/07/08 08:47:58 tsjensen
|
|
||||||
# Removed -traditional flag from CFLAGS definition
|
|
||||||
# Updated email and web addresses
|
|
||||||
#
|
|
||||||
# Revision 1.1 1999/08/13 20:56:09 tsjensen
|
|
||||||
# Initial revision
|
|
||||||
#
|
|
||||||
#____________________________________________________________________________
|
#____________________________________________________________________________
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
||||||
@ -50,6 +31,9 @@ ALLFILES = Makefile $(C_SRC) regexp.h regmagic.h
|
|||||||
ALLOBJ = $(C_SRC:.c=.o)
|
ALLOBJ = $(C_SRC:.c=.o)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean build debug
|
||||||
|
|
||||||
|
|
||||||
build: libregexp.a
|
build: libregexp.a
|
||||||
debug: libregexp.a
|
debug: libregexp.a
|
||||||
|
|
||||||
@ -62,26 +46,9 @@ regsub.o: regsub.c regmagic.h regexp.h ../config.h
|
|||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) -c $<
|
$(CC) $(CFLAGS) -c $<
|
||||||
|
|
||||||
snap: $(ALLFILES)
|
|
||||||
@if [ -z "$(SNAPFILE)" ] ; then echo "make snap must be run from the main directory" ; exit 1 ; fi
|
|
||||||
mkdir $(SNAPFILE)/src/regexp
|
|
||||||
cp $(ALLFILES) $(SNAPFILE)/src/regexp
|
|
||||||
|
|
||||||
rcstest:
|
|
||||||
-for i in $(ALLFILES) ; do rcsdiff $$i ; done
|
|
||||||
|
|
||||||
rcslocks:
|
|
||||||
@rlog -L -R $(ALLFILES) | sed -e 's/^/ - src\/regexp\//'
|
|
||||||
|
|
||||||
logpage: $(C_SRC)
|
|
||||||
@echo $(ALL_CL)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(ALLOBJ) libregexp.a core
|
rm -f $(ALLOBJ) libregexp.a core
|
||||||
|
|
||||||
love:
|
|
||||||
@echo "Not in front of the kids, honey!"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#EOF
|
#EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user