$NetBSD: patch-src_Makefile,v 1.1 2021/03/21 10:21:07 fcambus Exp $ Honor CC, CFLAGS and LDFLAGS from pkgsrc. --- src/Makefile.orig 2021-03-20 15:15:32.000000000 +0000 +++ src/Makefile @@ -12,15 +12,15 @@ # if you are compiling under UNIX, change the above lines to # reflect the location of zlib. I use: USEZ = -DZLIB_CAPABLE -I../zlib -ZLIB = -L../zlib -lz +#ZLIB = -L../zlib -lz UNIX = -DUNIX # Compiler flags, if you are using egcs, pgcs, or gcc >2.8.1 use: #CFLAGS = -g -Wall $(USEZ) $(DOS) $(UNIX) $(ARCH) -CFLAGS = -Wall $(USEZ) $(DOS) $(UNIX) -O3 -fomit-frame-pointer $(ARCH) +CFLAGS += $(USEZ) $(DOS) $(UNIX) L = $(ZLIB) -CC = gcc +#CC = gcc DESTDIR = /usr/local/bin MANDIR = /usr/local/man/man1 DOCDIR = /usr/local/doc/atasm @@ -41,7 +41,7 @@ state2.o: symbol.h symbol.o: symbol.h inc_path.h atasm_err.h prog : $(OBJS) - $(CC) -o atasm $(OBJS) $(L) $(ARCH) + $(CC) $(LDFLAGS) -o atasm $(OBJS) $(L) $(ARCH) clean: rm -f *.rej *.o *~ atasm atasm.1 atasm.exe