--- Makefile	2024-03-12 14:19:07
+++ Makefile	2024-03-12 14:23:08
@@ -3,11 +3,8 @@
 # Originals from Dan Lanciani, James Turner, and others...
 # This Makefile supports Atari ST and all Unix versions.
 
-# The installation prefix
-PREFIX = /usr/local
-
 # This version is needed for the dist target
-VERSION = 5.21p
+VERSION := 5.21p
 #
 # I put SRCDIR on a real disk on the ST, but copy the makefile to a
 # RAMdisk and compile from there. Makes things go a bit quicker...
@@ -37,17 +34,15 @@
 # On Solaris, use -DSYSV=1 -DNEED_ALPHASORT and set SYSVOBJ=scandir.o
 # (See the Sysvarcstuf shar file)
 #SYSTEM = -DGEMDOS=1 -fstrength-reduce -fomit-frame-pointer -finline-functions -fdefer-pop -mpcrel
-#SYSTEM = -DBSD=1
-SYSTEM = -DSYSV=1
+SYSTEM = -DBSD=1
+#SYSTEM = -DSYSV=1
 
-OPT = -O -Wall
 # For MWC 3.0 on the Atari ST, use:
 #CFLAGS = -VCOMPAC -VPEEP
-CFLAGS = $(OPT) $(SYSTEM)
+CFLAGS += $(OPT) $(SYSTEM) $(CPPFLAGS)
 
 # GNU's gcc is very nice, if you've got it. Otherwise just cc.
 #CC = cgcc -mshort -mbaserel
-CC = cc
 
 # tmclock is only needed on Unix systems...
 TMCLOCK = tmclock.o
@@ -68,10 +63,10 @@
 all:	arc$(PROG) marc$(PROG)
 
 arc$(PROG):	$(OBJS) $(TMCLOCK)
-	$(CC) $(OPT) -o arc$(PROG) $(OBJS) $(TMCLOCK) $(LIBS)
+	$(CC) $(OPT) -o arc$(PROG) $(OBJS) $(TMCLOCK) $(LIBS) $(LDFLAGS)
 
 marc$(PROG):	$(MOBJ) $(TMCLOCK)
-	$(CC) $(OPT) -o marc$(PROG) $(MOBJ) $(TMCLOCK) $(LIBS)
+	$(CC) $(OPT) -o marc$(PROG) $(MOBJ) $(TMCLOCK) $(LIBS) $(LDFLAGS)
 
 clean:
 	rm -f *.o arc$(PROG) marc$(PROG)