$NetBSD: patch-Makefile,v 1.2 2025/01/24 20:41:04 riastradh Exp $ Honour CFLAGS/LDFLAGS, properly separate compile and link stages. --- Makefile.orig 2004-03-28 19:59:07.000000000 +0000 +++ Makefile @@ -4,10 +4,16 @@ PREFIX=/usr/local BIN_INSTALL_DIR=$(PREFIX)/bin MAN_INSTALL_DIR=$(PREFIX)/share/man/man1 -xmlindent: lexer - gcc -Wall -g error.c indent.c buffer.c main.c -o xmlindent -lfl +OBJS= error.o indent.o buffer.o main.o -lexer: +$(OBJS): lex.yy.c +.c.o: + $(CC) $(CFLAGS) -c $< + +xmlindent: $(OBJS) + $(CC) $(LDFLAGS) $(OBJS) -o xmlindent -lfl + +lex.yy.c: flex xmlindent.yy install: xmlindent