* libvorbis (1.3.2 or higher)
Earlier versions of these libraries might work, but are untested.
-Frotz can be compiled without curses, leaving you with a dumb-mode
-interface. This option is provided for hysterical raisins and for those
-who find it useful for web-based front-ends, bots, and whatever else you
-can think up. Read the DUMB file for more information.
-
Linux uses ncurses, so you're safe there. The version of curses that
comes with NetBSD 1.6.x and later is good too. Earlier versions lacked
certain features needed by Frotz. I don't know about the other *BSD
It's always a good idea to have the GNU version of make(1) around.
+=============
+Dumb Frotz ||
+=============
+
+Frotz can be compiled without curses, leaving you with a dumb-mode
+interface with no dependencies whatsoever besides a functioning C
+library. This interface is provided for having fun on extremely old
+computers and for those who find it useful for web-based front-ends,
+bots, and whatever else you can think up. Read the DUMB file for more
+information.
+
+Unless the machine on which you're trying to build Dumb Frotz is missing
+some vital functions, no editing of the Makefile should be necessary.
+Check to see if that OS provides memmove(), strdup(), strndup(), or
+strrchr() functions. If not, there are some options in the Makefile
+that cause Frotz to use its own versions of these functions.
+
+
============
SDL Frotz ||
============
SDL Frotz (aka sfrotz) started off as a port of Frotz 2.32. After
languishing for several years, it is now incorporated into the Unix
-Frotz codebase as a one of the available interfaces.
+Frotz codebase as a one of the available interfaces. With SDL Frotz,
+full support for V6 games is provided.
Prerequisite packages for sfrotz:
* libsdl2-dev
Editing the Makefile ||
=======================
-You should take a look at the Makefile, which is found in the src/
-subdirectory. Read the comments. It's pretty self-explanatory. This
-is where you define your compiler, where Frotz will be installed, what
-libraries you're using, if you want sound support, and so on.
+You should take a look at the Makefile. Read the comments. It's pretty
+self-explanatory. This is where you define your compiler, where Frotz
+will be installed, what libraries you're using, if you want sound
+support, and so on.
If this is too much for you, try using your operating systems's
packaging scheme to install Frotz for you. If the latest version of
the necessary header files and libraries live and edit the Makefile
accordingly.
-Once the compile is complete, make sure you have the correct permissions
-to write where you want Frotz installed, then type "make install".
-
-To uninstall Frotz, type "make uninstall".
+Once the compile is complete, make sure you have the correct permissions
+to write where you want Frotz installed, then type "make install". To
+uninstall Frotz, type "make uninstall".
If you don't have permission to install Frotz, you can just put the
resulting executable somewhere like $HOME/bin and add that directory to
your $PATH.
-For compiling, installing, and uninstalling dumb frotz, use "make dfrotz",
-"make install_dfrotz", and "make uninstall_dfrotz". The process is exactly
+For compiling, installing, and uninstalling Frotz using the dumb or SDL
+interfaces, type "make dumb" or "make sdl". You will get an executable
+file named "dfrotz" for Dumb Frotz and "sfrotz" for SDL Frotz. To
+install these, type "make install_dumb" or "make install_sdl". to
+uninstall these, type "make uninstall_dumb" or "make uninstall_sdl".
+Substituting "dfrotz" for "dumb" and "sfrotz" for "sdl" will also work.
+
+For compiling, installing, and uninstalling dumb frotz, use "make dumb",
+"make install_dumb", and "make uninstall_dumb". The process is exactly
the same as above except you won't be depending on any external
libraries; not even curses.
## LIBDIR path for Apple MacOS Sierra 10.12 plus MacPorts
#LIBDIR ?= /opt/local/lib
-CFLAGS += -I$(INCLUDEDIR)
-LDFLAGS += -L$(LIBDIR)
-
-RANLIB ?= $(shell which ranlib)
-AR ?= $(shell which ar)
-
# Choose your sound support
# OPTIONS: ao, none
SOUND ?= ao
+
+##########################################################################
+# The configuration options below are intended mainly for older flavors
+# of Unix. For Linux, BSD, and Solaris released since 2003, you can
+# ignore this section.
+##########################################################################
+
# Default sample rate for sound effects.
# All modern sound interfaces can be expected to support 44100 Hz sample
# rates. Earlier ones, particularly ones in Sun 4c workstations support
# Default sample rate converter type
DEFAULT_CONVERTER ?= SRC_SINC_MEDIUM_QUALITY
-
-##########################################################################
-# The configuration options below are intended mainly for older flavors
-# of Unix. For Linux, BSD, and Solaris released since 2003, you can
-# ignore this section.
-##########################################################################
-
-# If your machine's version of curses doesn't support color...
+# Comment this out if your machine's version of curses doesn't support color.
#
COLOR ?= yes
# If this matters, you can choose -lcurses or -lncurses
CURSES ?= -lncurses
+#CURSES ?= -lcurses
# Uncomment this if you want to disable the compilation of Blorb support.
#
#NO_BLORB = yes
-
# These are for enabling local version of certain functions which may be
# missing or behave differently from what's expected in modern system.
# If you're running on a system made in the past 20 years, you should be
# Under normal circumstances, nothing in this section should be changed.
#########################################################################
+CFLAGS += -I$(INCLUDEDIR)
+LDFLAGS += -L$(LIBDIR)
+
+RANLIB ?= $(shell which ranlib)
+AR ?= $(shell which ar)
+
export CC
export CFLAGS
export MAKEFLAGS
export LIBDIR
export COLOR
+NAME = frotz
# If we're working from git, we have access to proper variables. If
# not, make it clear that we're working from a release.
rm -f "$(DESTDIR)$(PREFIX)/bin/frotz"
rm -f "$(DESTDIR)$(MANDIR)/man6/frotz.6"
+install_dumb: install_dfrotz
install_dfrotz: $(DFROTZ_BIN)
install -d "$(DESTDIR)$(PREFIX)/bin" "$(DESTDIR)$(MANDIR)/man6"
install "$(DFROTZ_BIN)" "$(DESTDIR)$(PREFIX)/bin/"
install -m 644 doc/dfrotz.6 "$(DESTDIR)$(MANDIR)/man6/"
+uninstall_dumb: uninstall_dfrotz
uninstall_dfrotz:
rm -f "$(DESTDIR)$(PREFIX)/bin/dfrotz"
rm -f "$(DESTDIR)$(MANDIR)/man6/dfrotz.6"
-dist: frotz-$(GIT_TAG).tar
+dist: $(NAME)-$(GIT_TAG).tar
frotz-$(GIT_TAG).tar:
- git archive --format=tar --prefix frotz-$(GIT_TAG)/ HEAD | tar xf -
- sed s"/GIT_BRANCH = none/GIT_BRANCH = \"$(GIT_BRANCH)\"/" -i frotz-$(GIT_TAG)/Makefile
- sed s"/GIT_HASH = none/GIT_HASH = \"$(GIT_HASH)\"/" -i frotz-$(GIT_TAG)/Makefile
- sed s"/GIT_HASH_SHORT = none/GIT_HASH_SHORT = \"$(GIT_HASH_SHORT)\"/" -i frotz-$(GIT_TAG)/Makefile
- sed s"/GIT_TAG = none/GIT_TAG = \"$(GIT_TAG)\"/" -i frotz-$(GIT_TAG)/Makefile
- tar zcf frotz-$(GIT_TAG).tar.gz frotz-$(GIT_TAG)
- rm -rf frotz-$(GIT_TAG)
+ git archive --format=tar --prefix $(NAME)-$(GIT_TAG)/ HEAD | tar xf -
+ sed s"/GIT_BRANCH = none/GIT_BRANCH = \"$(GIT_BRANCH)\"/" -i $(NAME)-$(GIT_TAG)/Makefile
+ sed s"/GIT_HASH = none/GIT_HASH = \"$(GIT_HASH)\"/" -i $(NAME)-$(GIT_TAG)/Makefile
+ sed s"/GIT_HASH_SHORT = none/GIT_HASH_SHORT = \"$(GIT_HASH_SHORT)\"/" -i $(NAME)-$(GIT_TAG)/Makefile
+ sed s"/GIT_TAG = none/GIT_TAG = \"$(GIT_TAG)\"/" -i $(NAME)-$(GIT_TAG)/Makefile
+ tar zcf $(NAME)-$(GIT_TAG).tar.gz $(NAME)-$(GIT_TAG)
+ rm -rf $(NAME)-$(GIT_TAG)
clean: $(SUB_CLEAN)
- rm -rf frotz-$(GIT_TAG)
+ rm -rf $(NAME)-$(GIT_TAG)
rm -f $(SRCDIR)/*.h \
$(SRCDIR)/*.a \
$(COMMON_DEFINES) \
$(COMMON_STRINGS) \
$(HASH) \
$(CURSES_DEFINES) \
- frotz*.tar.gz
+ $(NAME)*.tar.gz
distclean: clean
rm -f frotz$(EXTENSION) dfrotz$(EXTENSION) sfrotz$(EXTENSION)
@echo ""
@echo "Targets:"
@echo " frotz: the standard edition"
- @echo " dfrotz: for dumb terminals and wrapper scripts"
- @echo " sfrotz: for SDL graphics and sound"
+ @echo " dumb: for dumb terminals and wrapper scripts"
+ @echo " sdl: for SDL graphics and sound"
@echo " install"
@echo " uninstall"
- @echo " install_dfrotz"
- @echo " uninstall_dfrotz"
- @echo " install_sfrotz"
- @echo " uninstall_sfrotz"
+ @echo " install_dumb"
+ @echo " uninstall_dumb"
+ @echo " install_sdl"
+ @echo " uninstall_sdl"
@echo " install_all"
@echo " uninstall_all"
@echo " clean: clean up files created by compilation"