freebsd-ports/devel/cocktail/files/patch-l2r-src-Makefile
Pav Lucistnik c0150116c3 Add cocktail, a set of program generators or compiler construction tools
for nearly all phases of a compiler. It has been developed until 1993
at the Karlsruhe research lab of GMD, the German National Research Center
for Information Technology.

PR:		ports/65164
Submitted by:	Willem Jan Withagen <wjw@withagen.nl>
2004-05-04 21:07:46 +00:00

56 lines
1.1 KiB
Text

--- ../../work/cocktail-9309//./l2r/src/Makefile Tue Feb 15 14:23:48 1994
+++ ./l2r/src/Makefile Wed Mar 31 23:29:37 2004
@@ -1,32 +1,34 @@
-BIN = $(HOME)/bin
-OPT = -O
-CC = cc
-REUSE = ../../reuse/c
-CFLAGS = -w -I$(REUSE) $(OPT)
+
+.include "../../Makefile.inc"
+
+ROOTDIR = ../..
+CFLAGS += -I$(INCDIRC)
+CLIBS += $(REUSELIBC)
+
OBJS = l2r.o Parser.o Scanner.o Errors.o StringBuf.o
SOURCES = Scanner.h Scanner.c Parser.h Parser.c
# targets
l2r: $(OBJS)
- $(CC) -o l2r $(CFLAGS) $(OBJS) $(REUSE)/libreuse.a
+ $(CC) -o l2r $(CFLAGS) $(OBJS) $(REUSELIBC)
sources: $(SOURCES)
Scanner.h Scanner.c: lex.rex
- rex -cd lex.rex;
+ $(REX) -cd lex.rex;
Parser.h Parser.c: lex.lalr
- lalr -b -c -d lex.lalr;
+ $(LALR) -b -c -d lex.lalr;
install: l2r
- install -c -s -m 755 l2r $(BIN)
+ install -c -s -m 755 l2r $(DESTBIN)
lint: l2r.c Parser.c Scanner.c Errors.c StringBuf.c
- lint -I$(REUSE) -b -u *.c
+ lint -I$(INCDIRC) -b -u *.c
clean:
- rm -f core l2r *.o
+ rm -f core l2r *.o Scanner.c Scanner.h
CLEAN: clean
rm -f $(SOURCES)
@@ -44,7 +46,4 @@
man:
nroff -man l2r.1
-.SUFFIXES: .c .o
-.c.o:
- $(CC) $(CFLAGS) -c $*.c