diff --git a/GNUmakefile b/GNUmakefile index b4c20bf..33ccb7f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,12 +1,33 @@ +# This is the Makefile for Linux, macOS, and other systems +# using GNU Make. For BSD users, look at the Makefile instead. +# ------------------------------------------------------------- + +# These are used when building and signing a release. + VERSION ?= 2022.1 KEYPAIR ?= 2022-01 + +# ------------------------------------------------------------- + +# Installation targets + PREFIX ?= /usr/local DATADIR ?= $(PREFIX)/share/RETRO12 DOCSDIR ?= $(PREFIX)/share/doc/RETRO12 EXAMPLESDIR ?= $(PREFIX)/share/examples/RETRO12 MANDIR ?= $(PREFIX)/share/man/man1 + +# ------------------------------------------------------------- + +# Flags for adding in libraries we need to link to. + +# If not using floating point, you can remove the `-lm` from +# LIBM. + LIBM ?= -lm +# You can comment out this if not enabling the FFI. + LIBDL ?= UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) @@ -15,6 +36,17 @@ endif CFLAGS ?= -O2 +# ------------------------------------------------------------- + +# The I/O devices can be enabled or disabled. Comment or +# uncomment the corresponding ENABLED and DEVICES lines and +# then run `make`. Of particular note here, sockets support +# is disabled by default and you may wish to enable it. +# +# Don't uncomment the line with -DNEEDS_STRL. I use the BSD +# strl* functions and provide a copy of them when needed. GNU +# libc does not include these. + ENABLED ?= ENABLED += -DENABLE_FLOATS ENABLED += -DENABLE_FILES @@ -39,10 +71,12 @@ DEVICES += interface/clock.retro DEVICES += interface/scripting.retro # DEVICES += interface/sockets.retro DEVICES += interface/sources.retro -# DEVICES += interface/multicore.retro +DEVICES += interface/multicore.retro DEVICES += interface/deprecated.retro DEVICES += interface/unsigned.retro +# ------------------------------------------------------------- + all: build help: diff --git a/Makefile b/Makefile index 566fa7c..90c4177 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,39 @@ -# Linux / macOS users: This Makefile is mainly intended for BSD -# systems. You probably want to look at or -# edit the GNUmakefile. +# This is the Makefile for BSD systems. If using GNU Make (e.g. +# on Linux or macOS), look at the GNUmakefile instead. # ------------------------------------------------------------- + +# These are used when building and signing a release. + VERSION ?= 2022.1 KEYPAIR ?= 2022-01 + +# ------------------------------------------------------------- + +# Installation targets + PREFIX ?= /usr/local DATADIR ?= $(PREFIX)/share/RETRO12 DOCSDIR ?= $(PREFIX)/share/doc/RETRO12 EXAMPLESDIR ?= $(PREFIX)/share/examples/RETRO12 MANDIR ?= $(PREFIX)/man/man1 -LIBM ?= -lm -g + +# ------------------------------------------------------------- + +# Flags for adding in libraries we need to link to. + +# If not using floating point, you can remove the `-lm` from +# LIBM. + +LIBM ?= -lm LIBDL ?= + +# ------------------------------------------------------------- + +# The I/O devices can be enabled or disabled. Comment or +# uncomment the corresponding ENABLED and DEVICES lines and +# then run `make`. Of particular note here, sockets support +# is disabled by default and you may wish to enable it. + ENABLED ?= ENABLED += -DENABLE_FLOATS ENABLED += -DENABLE_FILES @@ -37,6 +60,8 @@ DEVICES += interface/multicore.retro DEVICES += interface/unsigned.retro DEVICES += interface/deprecated.retro +# ------------------------------------------------------------- + all: build help: @@ -206,7 +231,6 @@ doc/Glossary-Names-and-Stack.txt: bin/retro sorted ./bin/retro tools/glossary.retro export concise-stack >doc/Glossary-Names-and-Stack.txt - # other targets release: clean build glossary