mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-02-24 21:41:05 +01: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
52
src/Makefile
52
src/Makefile
@ -3,7 +3,7 @@
|
||||
# Creation: March 18, 1999 (Thursday, 15:10h)
|
||||
# Author: Thomas Jensen
|
||||
# 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
|
||||
# Web Site: http://home.pages.de/~jensen/boxes/
|
||||
# Platforms: sparc/Solaris 2.6
|
||||
@ -13,6 +13,10 @@
|
||||
# Revision History:
|
||||
#
|
||||
# $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
|
||||
# Added tools.o and shape.o
|
||||
# Change in snapshot target directory (download)
|
||||
@ -45,23 +49,28 @@
|
||||
#============================================================================
|
||||
|
||||
|
||||
LEX = flex
|
||||
YACC = yacc
|
||||
CC = gcc
|
||||
CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ -I. $(CFLAGS_ADDTL)
|
||||
LDFLAGS = -L. -L/local/GNU/lib
|
||||
LEX = flex
|
||||
YACC = yacc
|
||||
CC = gcc
|
||||
CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ -I. $(CFLAGS_ADDTL)
|
||||
LDFLAGS = -L. -L/local/GNU/lib
|
||||
|
||||
GENSRC = y.tab.c y.tab.h lex.yy.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
|
||||
ALLSRC = $(ORIGSRC) $(HSSRC) $(GENSRC)
|
||||
ALLOBJ = y.tab.o lex.yy.o boxes.o shape.o tools.o generate.o remove.o
|
||||
SNAPFILE = boxes-SNAP-`date +%Y%m%d`
|
||||
|
||||
boxes: $(ALLOBJ) libregexp.a
|
||||
$(CC) $(LDFLAGS) $(ALLOBJ) -o boxes -lregexp -lfl
|
||||
GENSRC = y.tab.c y.tab.h lex.yy.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
|
||||
ALLSRC = $(ORIGSRC) $(HSSRC) $(GENSRC)
|
||||
ALLOBJ = y.tab.o lex.yy.o boxes.o shape.o tools.o generate.o remove.o
|
||||
|
||||
build:
|
||||
$(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
|
||||
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
|
||||
|
||||
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) -i lexer.l
|
||||
|
||||
snap: $(ALLSRC) Makefile
|
||||
mkdir boxes-SNAP-`date +%Y%m%d`
|
||||
cp $(ALLSRC) Makefile boxes-SNAP-`date +%Y%m%d`
|
||||
gtar cfvz boxes-SNAP-`date +%Y%m%d`.tar.gz boxes-SNAP-`date +%Y%m%d`/*
|
||||
rm -rf boxes-SNAP-`date +%Y%m%d`/
|
||||
cp boxes-SNAP-`date +%Y%m%d`.tar.gz $(HOME)/d/public_html/software/boxes/download/
|
||||
mkdir $(SNAPFILE)
|
||||
cp $(ALLSRC) Makefile $(SNAPFILE)
|
||||
gtar cfvz $(SNAPFILE).tar.gz $(SNAPFILE)/*
|
||||
rm -rf $(SNAPFILE)/
|
||||
cp $(SNAPFILE).tar.gz $(HOME)/d/public_html/software/boxes/download/
|
||||
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:
|
||||
rm -f lex.yy.c y.tab.c y.tab.h
|
||||
|
Loading…
Reference in New Issue
Block a user