pkgsrc/devel/tavrasm/patches/patch-aa
dillo a4d72e234b Update to 1.22 (provided by Joe Talbott in private mail, with some
changes by me).

pkgsrc changes: install man page.

Changes in 1.22:
Several updates for ATmega (new devices, extended I/O etc.)
Fixed problem with .db 00
2006-10-01 21:03:36 +00:00

56 lines
1.7 KiB
Text

$NetBSD: patch-aa,v 1.4 2006/10/01 21:03:36 dillo Exp $
--- src/makefile.orig 2003-03-12 01:56:02.000000000 +0100
+++ src/makefile
@@ -24,12 +24,14 @@ VERSION = 117
### Compiler options #########################################################
-CC = gcc
-CFLAGS = -O2 -Wall -DAVRLANG=LANGUAGE_$(LANGUAGE)
-CPPFLAGS =
+CC ?= gcc
+CFLAGS += -DAVRLANG=LANGUAGE_$(LANGUAGE)
+CPPFLAGS ?=
CCFLAGS = $(CFLAGS) $(CPPFLAGS)
-LINK = -lm -lstdc++
+LINK = $(LDFLAGS) $(LIBS) -lm -lstdc++
OBJS = avrparse.o avrlex.o avrasm.o symbol.o semantic.o utils.o
+LEX = lex
+YACC = bison
### Defaul CC files #########################################################
@@ -38,13 +40,15 @@ OBJS = avrparse.o avrlex.o avrasm.o sym
### Executable ##############################################################
+all: $(EXENAME)
+
$(EXENAME): $(OBJS)
$(CC) $(CCFLAGS) $(OBJS) $(LINK) -o $@
### Parser file #############################################################
avrparse.cc: avrparse.y avrasm.hh symbol.hh semantic.hh opcodes.hh
- bison -d -o avrparse avrparse.y
+ ${YACC} -d -o avrparse avrparse.y
mv avrparse avrparse.cc
mv avrparse.h avrparse.hh
@@ -52,12 +56,12 @@ avrparse.cc: avrparse.y avrasm.hh symbol
avrlex.cc: avrparse.cc avrlex.l symbol.hh semantic.hh avrparse.hh \
opcodes.hh avrasm.hh messages.hh
- flex -o$@ avrlex.l
+ ${LEX} -o$@ avrlex.l
### Dependencies ############################################################
-avrlex.o: avrlex.l
-avrparse.o: avrparse.y
+avrlex.o: avrlex.cc
+avrparse.o: avrparse.cc
avrasm.o: avrasm.cc avrasm.hh symbol.hh devices.hh messages.hh
symbol.o: symbol.cc symbol.hh avrasm.hh
utils.o: utils.cc utils.hh avrasm.hh messages.hh msg_us.hh msg_de.hh msg_sp.hh