Only set the Makefile variables conditionally so that they may be overridden by the FreeBSD port. --- source/Makefile.orig +++ source/Makefile @@ -26,18 +26,19 @@ # # GCC compiler and linker flags. -CC = gcc -DEBUG = -CEXTRA = -CFLAGS = -O2 -D__NO_STRING_INLINES -fPIC -ansi -D_STRICT_ANSI_ -Wall -W \ +CC ?= gcc +DEBUG ?= +CEXTRA ?= +CFLAGS ?= -O2 -D__NO_STRING_INLINES -fPIC -ansi -D_STRICT_ANSI_ -Wall -W \ -pedantic -Wshadow -Wpointer-arith -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \ -Wwrite-strings -Wundef -Wbad-function-cast -Waggregate-return \ -Wnested-externs \ - $(DEBUG) $(CEXTRA) -LDLIBS = -LDEXTRA = -LDFLAGS = $(DEBUG) $(LDEXTRA) + $(DEBUG) +CFLAGS += $(CEXTRA) +LDLIBS ?= +LDEXTRA ?= +LDFLAGS ?= $(DEBUG) $(LDEXTRA) # Generic compiler and linker flags. #CC = cc @@ -79,9 +80,9 @@ SHELL = /bin/sh # Miscellaneous tools, overridable by the command line. -UNZIP = unzip -RM = rm -TEST = test +UNZIP ?= unzip +RM ?= rm +TEST ?= test # SCARE objects and headers. OBJECTS = sctafpar.o sctaffil.o scprops.o scvars.o scexpr.o scprintf.o \