pkgsrc/math/aamath/patches/patch-Makefile
2011-12-16 22:31:46 +00:00

21 lines
614 B
Text

$NetBSD: patch-Makefile,v 1.1 2011/12/16 22:31:47 sbd Exp $
--- Makefile.orig 2005-06-22 20:12:18.000000000 +0000
+++ Makefile
@@ -3,12 +3,13 @@ LD = g++
CXXFILES = parser.cc lexer.cc expr.cc canvas.cc aamath.cc
OBJS = $(CXXFILES:.cc=.o)
TARGET = aamath
-CFLAGS = -Wall -O2 -g -DUSE_READLINE
-LFLAGS = -g
+CFLAGS ?= -Wall -O2 -g
+CFLAGS += -DUSE_READLINE
+LDFLAGS ?= -g
LIBS = -lreadline -ltermcap
$(TARGET): $(OBJS)
- $(LD) $(LFLAGS) $(OBJS) -o $@ $(LIBS)
+ $(LD) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
parser.cc parser.h: parser.y
yacc -d parser.y && mv y.tab.c parser.cc && mv y.tab.h parser.h