Added rules for new regular expression handling files

Added file header
Straightened out clean commands
This commit is contained in:
Thomas Jensen 1999-04-04 16:12:40 +00:00
parent 4c0375a015
commit 006a3bc702

View File

@ -1,18 +1,22 @@
# #
# File: Makefile # File: Makefile
# Date created: 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$ # Version: $Id: Makefile,v 1.4 1999/04/03 12:01:01 tsjensen Exp tsjensen $
# Format: GNU make # Format: GNU make
# World Wide Web: http://home.pages.de/~jensen/boxes/ # Web Site: http://home.pages.de/~jensen/boxes/
# Platforms: sparc/Solaris 2.6 # Platforms: sparc/Solaris 2.6
# Purpose: Makefile for boxes, the box drawing program # Purpose: Makefile for boxes, the box drawing program
# Remarks: --- # Remarks: ---
# #
# Revision History: # 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 # Revision 1.3 1999/03/22 10:57:14 tsjensen
# Added -D__EXTENSIONS__ # Added -D__EXTENSIONS__
# Compile everything but the parser with -Wall -W # Compile everything but the parser with -Wall -W
@ -31,25 +35,33 @@
LEX = flex LEX = flex
YACC = yacc YACC = yacc
CC = gcc CC = gcc
CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ $(CFLAGS_ADDTL) CFLAGS = -ansi -D_POSIX_C_SOURCE -D__EXTENSIONS__ -I. $(CFLAGS_ADDTL)
LDFLAGS = -L/local/GNU/lib LDFLAGS = -L. -L/local/GNU/lib
boxes: y.tab.o lex.yy.o boxes.o boxes: y.tab.o lex.yy.o boxes.o libregexp.a
$(CC) $(LDFLAGS) -o boxes y.tab.o lex.yy.o boxes.o -lfl $(CC) $(LDFLAGS) -o boxes y.tab.o lex.yy.o boxes.o -lregexp -lfl
build: build:
$(MAKE) CFLAGS_ADDTL=-O boxes $(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 lex.yy.o: lex.yy.c y.tab.h
$(CC) $(CFLAGS) -DYY_NO_UNPUT -Wall -W -c lex.yy.c $(CC) $(CFLAGS) -DYY_NO_UNPUT -Wall -W -c lex.yy.c
y.tab.o: y.tab.c y.tab.h 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 $(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 $(YACC) -d parser.y
lex.yy.c: lexer.l boxes.h lex.yy.c: lexer.l boxes.h
@ -57,8 +69,8 @@ lex.yy.c: lexer.l boxes.h
clean: clean:
rm -f lex.yy.c y.tab.c y.tab.h rm -f lex.yy.c y.tab.c y.tab.h
rm -f lex.yy.o y.tab.o rm -f *.o core
rm -f boxes.o boxes rm -f libregexp.a boxes
love: love:
@echo "Not in front of the kids, honey!" @echo "Not in front of the kids, honey!"