improve 1990 Makefiles

This commit is contained in:
Landon Curt Noll committed 2023-02-21 19:05:12 -08:00
1 parent ba347e3e17
commit fca5a78645
13 files changed
+415 -692

No files matched your search

+33 -56
View File
@@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib
#X11_INCDIR= /usr/X11/include
X11_INCDIR= /opt/X11/include
# CWARN - Silence warnings that ${CWARN} would normally complain about
# CSILENCE -Compiler warnings
#
ifeq ($(CC),clang)
# clang CSILENCE and CWARN
# Common C compiler warnings to silence
#
#CSILENCE=
CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \
-Wno-format-security -Wno-return-type -Wno-unused-value
#
#CWARN= ${CSILENCE}
#CWARN= -Wall ${CSILENCE}
#CWARN= -Wall -Wextra ${CSILENCE}
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
CWARN= -Wall -Wextra -Weverything ${CSILENCE}
#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
else
ifeq ($(CC),gcc)
# gcc CSILENCE and CWARN
#
#CSILENCE=
CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \
-Wno-format-security -Wno-return-type -Wno-unused-value
# Common C compiler warning flags
#
#CWARN= ${CSILENCE}
#CWARN= -Wall ${CSILENCE}
CWARN= -Wall -Wextra ${CSILENCE}
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
else
# default CSILENCE and WARN
#
#CSILENCE=
CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \
-Wno-format-security -Wno-return-type -Wno-unused-value
#
#CWARN= ${CSILENCE}
#CWARN= -Wall ${CSILENCE}
CWARN= -Wall -Wextra ${CSILENCE}
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
#CWARN= -Wall -Wextra -Weverything ${CSILENCE}
#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
endif
endif
# compiler standard
# Compiler standard
#
#CSTD=
#CSTD= -ansi
CSTD= -std=gnu90
# compiler bit architecture
# Compiler bit architecture
#
# Some entries require 32-bitness:
# ARCH= -m32
@@ -396,12 +359,12 @@ CSTD= -std=gnu90
#
ARCH=
# defines that are needed to compile
# Defines that are needed to compile
#
#CDEFINE=
CDEFINE= -DM=500 -DN=52 -DX="srand((int)time(0L))" -DV=void
# include files that are needed to compile
# Include files that are needed to compile
#
CINCLUDE=
#CINCLUDE= -include stdlib.h
@@ -410,7 +373,7 @@ CINCLUDE=
#CINCLUDE= -I ${X11_INCDIR}
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
# optimization
# Optimization
#
# Most compiles will safely use -O2. Some can use only -O1 or -O.
# A few compilers have broken optimizers or this entry make break
@@ -423,7 +386,7 @@ CINCLUDE=
#OPT= -O2
OPT= -O3
# default flags for ANSI C compilation
# Default flags for ANSI C compilation
#
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
@@ -434,20 +397,34 @@ LIBS=
#LIBS= -L ${X11_LIBDIR} -lX11
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
# ANSI compiler
#
# Set CC to the name of your ANSI compiler.
#
# Some entries seem to need gcc. If you have gcc, set
# both CC and MAY_NEED_GCC to gcc.
#
# If you do not have gcc, set CC to the name of your ANSI compiler, and
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
# to disable such programs.
# C compiler to use
#
CC= cc
#CC=clang
MAY_NEED_GCC= gcc
#CC=gcc
# Compiler add-ons or replacements for clang only
#
ifeq ($(CC),clang)
#
CSILENCE+= -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-pedantic \
-Wno-poison-system-directories -Wno-shadow -Wno-strict-prototypes \
-Wno-comma -Wno-format-nonliteral -Wno-implicit-int-conversion \
-Wno-shorten-64-to-32
#
CWARN+= -Weverything
#
endif
# Specific add-ons or replacements for gcc only
#
ifeq ($(CC),gcc)
#
#CSILENCE+=
#
#CWARN+=
#
endif
##############################