From 5946dea19f0ab3555f1dfecfecd8c2372dc0ef7c Mon Sep 17 00:00:00 2001 From: David Griffith Date: Mon, 30 Jul 2018 04:22:57 -0700 Subject: [PATCH] Clean up Makefiles re exported variables. --- Makefile | 22 ++++++++++++++++++++-- src/curses/Makefile | 2 +- src/dumb/Makefile | 2 +- src/sdl/Makefile | 2 +- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5a78334..4c82c63 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Your C compiler -#CC=gcc +CC=gcc #CC=clang # Enable compiler warnings. This is an absolute minimum. @@ -31,10 +31,11 @@ CFLAGS += -I$(INCLUDEDIR) LDFLAGS += -L$(LIBDIR) RANLIB ?= $(shell which ranlib) +AR ?= $(shell which ar) # Choose your sound support # OPTIONS: ao, none -export SOUND ?= ao +SOUND ?= ao # Default sample rate for sound effects. # All modern sound interfaces can be expected to support 44100 Hz sample @@ -79,6 +80,23 @@ CURSES ?= -lncurses # Under normal circumstances, nothing in this section should be changed. ######################################################################### +export CC +export CFLAGS +export AR +export RANLIB +export PREFIX +export MANDIR +export SYSCONFDIR +export INCLUDEDIR +export LIBDIR +export SOUND +export SAMPLERATE +export BUFFSIZE +export DEFAULT_CONVERTER +export COLOR +export STRRCHR_DEF + + # Versioning MAJOR=2 MINOR=44 diff --git a/src/curses/Makefile b/src/curses/Makefile index 136f412..34ecc79 100644 --- a/src/curses/Makefile +++ b/src/curses/Makefile @@ -28,7 +28,7 @@ endif $(TARGET): $(OBJECTS) $(AR) $(ARFLAGS) $@ $? - ranlib $@ + $(RANLIB) $@ clean: rm -f $(TARGET) $(OBJECTS) diff --git a/src/dumb/Makefile b/src/dumb/Makefile index 515b8c6..952be49 100644 --- a/src/dumb/Makefile +++ b/src/dumb/Makefile @@ -13,7 +13,7 @@ ARFLAGS = rc $(TARGET): $(OBJECTS) $(AR) $(ARFLAGS) $@ $? - ranlib $@ + $(RANLIB) $@ clean: rm -f $(TARGET) $(OBJECTS) diff --git a/src/sdl/Makefile b/src/sdl/Makefile index af002d8..49b4d73 100644 --- a/src/sdl/Makefile +++ b/src/sdl/Makefile @@ -23,7 +23,7 @@ TARGET = frotz_sdl.a $(TARGET): $(OBJECTS) $(AR) $(ARFLAGS) $@ $? - ranlib $@ + $(RANLIB) $@ clean: -rm -f $(TARGET) $(OBJECTS) $(DEPS) -- 2.34.1