mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-04-10 17:08:17 +02:00
Added macro SNAPFILE for boxes-SNAP-date +%Y%m%d
Added target rcstest Now builds optimized code by default Added debug target for non-optimized code w/ debugging info
This commit is contained in:
parent
5717471559
commit
ef582a464c
34
src/Makefile
34
src/Makefile
@ -3,7 +3,7 @@
|
|||||||
# Creation: March 18, 1999 (Thursday, 15:10h)
|
# Creation: March 18, 1999 (Thursday, 15:10h)
|
||||||
# Author: Thomas Jensen
|
# Author: Thomas Jensen
|
||||||
# tsjensen@stud.informatik.uni-erlangen.de
|
# tsjensen@stud.informatik.uni-erlangen.de
|
||||||
# Version: $Id: Makefile,v 1.7 1999/06/23 12:27:50 tsjensen Exp tsjensen $
|
# Version: $Id: Makefile,v 1.8 1999/06/23 19:35:17 tsjensen Exp tsjensen $
|
||||||
# Format: GNU make
|
# Format: GNU make
|
||||||
# Web Site: http://home.pages.de/~jensen/boxes/
|
# Web Site: http://home.pages.de/~jensen/boxes/
|
||||||
# Platforms: sparc/Solaris 2.6
|
# Platforms: sparc/Solaris 2.6
|
||||||
@ -13,6 +13,10 @@
|
|||||||
# Revision History:
|
# Revision History:
|
||||||
#
|
#
|
||||||
# $Log: Makefile,v $
|
# $Log: Makefile,v $
|
||||||
|
# Revision 1.8 1999/06/23 19:35:17 tsjensen
|
||||||
|
# Added remove.o and generate.o
|
||||||
|
# Introduced implicit rule .c.o, simplifying commands for most sources
|
||||||
|
#
|
||||||
# Revision 1.7 1999/06/23 12:27:50 tsjensen
|
# Revision 1.7 1999/06/23 12:27:50 tsjensen
|
||||||
# Added tools.o and shape.o
|
# Added tools.o and shape.o
|
||||||
# Change in snapshot target directory (download)
|
# Change in snapshot target directory (download)
|
||||||
@ -51,17 +55,22 @@ CC = gcc
|
|||||||
CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ -I. $(CFLAGS_ADDTL)
|
CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ -I. $(CFLAGS_ADDTL)
|
||||||
LDFLAGS = -L. -L/local/GNU/lib
|
LDFLAGS = -L. -L/local/GNU/lib
|
||||||
|
|
||||||
|
SNAPFILE = boxes-SNAP-`date +%Y%m%d`
|
||||||
|
|
||||||
GENSRC = y.tab.c y.tab.h lex.yy.c
|
GENSRC = y.tab.c y.tab.h lex.yy.c
|
||||||
HSSRC = regexp.c regexp.h regmagic.h regsub.c
|
HSSRC = regexp.c regexp.h regmagic.h regsub.c
|
||||||
ORIGSRC = boxes.c boxes.h lexer.l parser.y tools.c tools.h shape.c shape.h generate.c generate.h remove.h remove.c
|
ORIGSRC = boxes.c boxes.h lexer.l parser.y tools.c tools.h shape.c shape.h generate.c generate.h remove.h remove.c
|
||||||
ALLSRC = $(ORIGSRC) $(HSSRC) $(GENSRC)
|
ALLSRC = $(ORIGSRC) $(HSSRC) $(GENSRC)
|
||||||
ALLOBJ = y.tab.o lex.yy.o boxes.o shape.o tools.o generate.o remove.o
|
ALLOBJ = y.tab.o lex.yy.o boxes.o shape.o tools.o generate.o remove.o
|
||||||
|
|
||||||
boxes: $(ALLOBJ) libregexp.a
|
|
||||||
$(CC) $(LDFLAGS) $(ALLOBJ) -o boxes -lregexp -lfl
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(MAKE) CFLAGS_ADDTL=-O boxes
|
$(MAKE) CFLAGS_ADDTL=-O boxes
|
||||||
|
strip boxes
|
||||||
|
debug:
|
||||||
|
$(MAKE) CFLAGS_ADDTL=-g boxes
|
||||||
|
|
||||||
|
boxes: $(ALLOBJ) libregexp.a
|
||||||
|
$(CC) $(LDFLAGS) $(ALLOBJ) -o boxes -lregexp -lfl
|
||||||
|
|
||||||
libregexp.a: regexp.o regsub.o
|
libregexp.a: regexp.o regsub.o
|
||||||
ar cr libregexp.a regexp.o regsub.o
|
ar cr libregexp.a regexp.o regsub.o
|
||||||
@ -87,19 +96,22 @@ y.tab.c y.tab.h: parser.y boxes.h regexp.h
|
|||||||
$(YACC) -d parser.y
|
$(YACC) -d parser.y
|
||||||
|
|
||||||
lex.yy.o: lex.yy.c y.tab.h tools.h shape.h
|
lex.yy.o: lex.yy.c y.tab.h tools.h shape.h
|
||||||
$(CC) $(CFLAGS) -DYY_NO_UNPUT -Wall -W -c lex.yy.c
|
$(CC) $(CFLAGS) -Wall -W -DYY_NO_UNPUT -c lex.yy.c
|
||||||
|
|
||||||
lex.yy.c: lexer.l boxes.h
|
lex.yy.c: lexer.l boxes.h
|
||||||
$(LEX) -i lexer.l
|
$(LEX) -i lexer.l
|
||||||
|
|
||||||
snap: $(ALLSRC) Makefile
|
snap: $(ALLSRC) Makefile
|
||||||
mkdir boxes-SNAP-`date +%Y%m%d`
|
mkdir $(SNAPFILE)
|
||||||
cp $(ALLSRC) Makefile boxes-SNAP-`date +%Y%m%d`
|
cp $(ALLSRC) Makefile $(SNAPFILE)
|
||||||
gtar cfvz boxes-SNAP-`date +%Y%m%d`.tar.gz boxes-SNAP-`date +%Y%m%d`/*
|
gtar cfvz $(SNAPFILE).tar.gz $(SNAPFILE)/*
|
||||||
rm -rf boxes-SNAP-`date +%Y%m%d`/
|
rm -rf $(SNAPFILE)/
|
||||||
cp boxes-SNAP-`date +%Y%m%d`.tar.gz $(HOME)/d/public_html/software/boxes/download/
|
cp $(SNAPFILE).tar.gz $(HOME)/d/public_html/software/boxes/download/
|
||||||
rm -f $(HOME)/d/public_html/software/boxes/download/current-SNAP.tar.gz
|
rm -f $(HOME)/d/public_html/software/boxes/download/current-SNAP.tar.gz
|
||||||
(cd $(HOME)/d/public_html/software/boxes/download/; ln -s boxes-SNAP-`date +%Y%m%d`.tar.gz current-SNAP.tar.gz)
|
(cd $(HOME)/d/public_html/software/boxes/download/; ln -s $(SNAPFILE).tar.gz current-SNAP.tar.gz)
|
||||||
|
|
||||||
|
rcstest:
|
||||||
|
-for i in $(ALLSRC) Makefile boxes-config ; do rcsdiff $$i ; done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f lex.yy.c y.tab.c y.tab.h
|
rm -f lex.yy.c y.tab.c y.tab.h
|
||||||
|
Loading…
Reference in New Issue
Block a user