From 006a3bc702fff31b66dd6c1e48ac4d2b6024fb1d Mon Sep 17 00:00:00 2001 From: Thomas Jensen Date: Sun, 4 Apr 1999 16:12:40 +0000 Subject: [PATCH] Added rules for new regular expression handling files Added file header Straightened out clean commands --- src/Makefile | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/Makefile b/src/Makefile index 734643a..a5aa333 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,18 +1,22 @@ # -# File: Makefile -# Date created: March 18, 1999 (Thursday, 15:10h) -# Author: Thomas Jensen -# tsjensen@stud.informatik.uni-erlangen.de -# Version: $Id$ -# Format: GNU make -# World Wide Web: http://home.pages.de/~jensen/boxes/ -# Platforms: sparc/Solaris 2.6 -# Purpose: Makefile for boxes, the box drawing program -# Remarks: --- +# File: Makefile +# Creation: March 18, 1999 (Thursday, 15:10h) +# Author: Thomas Jensen +# tsjensen@stud.informatik.uni-erlangen.de +# Version: $Id: Makefile,v 1.4 1999/04/03 12:01:01 tsjensen Exp tsjensen $ +# Format: GNU make +# Web Site: http://home.pages.de/~jensen/boxes/ +# Platforms: sparc/Solaris 2.6 +# Purpose: Makefile for boxes, the box drawing program +# Remarks: --- # # Revision History: # -# $Log: boxes-config,v $ +# $Log: Makefile,v $ +# Revision 1.4 1999/04/03 12:01:01 tsjensen +# Added build target for optimized compilation +# Now linking with flex library instead of lex library +# # Revision 1.3 1999/03/22 10:57:14 tsjensen # Added -D__EXTENSIONS__ # Compile everything but the parser with -Wall -W @@ -31,25 +35,33 @@ LEX = flex YACC = yacc CC = gcc -CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ $(CFLAGS_ADDTL) -LDFLAGS = -L/local/GNU/lib +CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ -I. $(CFLAGS_ADDTL) +LDFLAGS = -L. -L/local/GNU/lib -boxes: y.tab.o lex.yy.o boxes.o - $(CC) $(LDFLAGS) -o boxes y.tab.o lex.yy.o boxes.o -lfl +boxes: y.tab.o lex.yy.o boxes.o libregexp.a + $(CC) $(LDFLAGS) -o boxes y.tab.o lex.yy.o boxes.o -lregexp -lfl build: $(MAKE) CFLAGS_ADDTL=-O boxes +libregexp.a: regexp.o regsub.o + ar cr libregexp.a regexp.o regsub.o + +regexp.o: regexp.c regmagic.h regexp.h + gcc -traditional -O -I. -c regexp.c +regsub.o: regsub.c regmagic.h regexp.h + gcc -traditional -O -I. -c regsub.c + lex.yy.o: lex.yy.c y.tab.h $(CC) $(CFLAGS) -DYY_NO_UNPUT -Wall -W -c lex.yy.c y.tab.o: y.tab.c y.tab.h -boxes.o: boxes.c boxes.h +boxes.o: boxes.c boxes.h regexp.h $(CC) $(CFLAGS) -Wall -W -c boxes.c -y.tab.c y.tab.h: parser.y boxes.h +y.tab.c y.tab.h: parser.y boxes.h regexp.h $(YACC) -d parser.y lex.yy.c: lexer.l boxes.h @@ -57,8 +69,8 @@ lex.yy.c: lexer.l boxes.h clean: rm -f lex.yy.c y.tab.c y.tab.h - rm -f lex.yy.o y.tab.o - rm -f boxes.o boxes + rm -f *.o core + rm -f libregexp.a boxes love: @echo "Not in front of the kids, honey!"