improve 1990 Makefiles
This commit is contained in:
1 parent
ba347e3e17
commit
fca5a78645
13 files changed
+415
-692
No files matched your search
+1
-1
@@ -50,7 +50,7 @@
|
|||||||
# tool locations
|
# tool locations
|
||||||
################
|
################
|
||||||
#
|
#
|
||||||
SHELL= /bin/bash
|
SHELL= bash
|
||||||
MAKE= make
|
MAKE= make
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+31
-57
@@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses \
|
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses \
|
||||||
-Wno-string-plus-int
|
-Wno-string-plus-int
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses \
|
|
||||||
-Wno-string-plus-int
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses \
|
|
||||||
-Wno-string-plus-int
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -396,12 +359,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -410,7 +373,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -423,7 +386,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -434,20 +397,31 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
CSILENCE+= -Wno-missing-variable-declarations -Wno-format-nonliteral -Wno-poison-system-directories
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+33
-56
@@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \
|
CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \
|
||||||
-Wno-format-security -Wno-return-type -Wno-unused-value
|
-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
|
# Common C compiler warning flags
|
||||||
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
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra ${CSILENCE}
|
CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# 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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -396,12 +359,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
#CDEFINE=
|
#CDEFINE=
|
||||||
CDEFINE= -DM=500 -DN=52 -DX="srand((int)time(0L))" -DV=void
|
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=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -410,7 +373,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -423,7 +386,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -434,20 +397,34 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#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
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+31
-59
@@ -328,66 +328,27 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-builtin-requires-header -Wno-char-subscripts -Wno-conditional-type-mismatch \
|
CSILENCE= -Wno-builtin-requires-header -Wno-char-subscripts -Wno-conditional-type-mismatch \
|
||||||
-Wno-empty-body -Wno-error -Wno-implicit-function-declaration \
|
-Wno-empty-body -Wno-error -Wno-implicit-function-declaration \
|
||||||
-Wno-incompatible-library-redeclaration -Wno-parentheses -Wno-implicit-int
|
-Wno-incompatible-library-redeclaration -Wno-parentheses -Wno-implicit-int
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-builtin-requires-header -Wno-char-subscripts -Wno-conditional-type-mismatch \
|
|
||||||
-Wno-empty-body -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-Wno-incompatible-library-redeclaration -Wno-parentheses -Wno-implicit-int
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-builtin-requires-header -Wno-char-subscripts -Wno-conditional-type-mismatch \
|
|
||||||
-Wno-empty-body -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-Wno-incompatible-library-redeclaration -Wno-parentheses -Wno-implicit-int
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -399,12 +360,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -413,7 +374,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -426,7 +387,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -437,20 +398,31 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+34
-58
@@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
#
|
||||||
ifeq ($(CC),clang)
|
#CSILENCE=
|
||||||
|
CSILENCE= -Wno-invalid-pp-token
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
# Common C compiler warning flags
|
||||||
#
|
|
||||||
CSILENCE=
|
|
||||||
#CSILENCE= -Wno-implicit-int
|
|
||||||
#
|
|
||||||
#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-implicit-int
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
CSILENCE=
|
|
||||||
#CSILENCE= -Wno-implicit-int
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -393,12 +358,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
#CDEFINE=
|
CDEFINE=
|
||||||
CDEFINE= -Dindex=strchr
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -407,7 +372,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -420,7 +385,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -431,20 +396,31 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
CSILENCE+= -Wno-poison-system-directories -Wno-strict-prototypes
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+60
-62
@@ -1,67 +1,65 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define d define
|
#define b12(x) 12 x
|
||||||
|
#define a13(x) x 13
|
||||||
#d b12(x) 12 x
|
#define a16(x) x 16
|
||||||
#d a13(x) x 13
|
#define a32(x) x 32
|
||||||
#d a16(x) x 16
|
#define acb(x) x]
|
||||||
#d a32(x) x 32
|
#define acc(x) x}
|
||||||
#d acb(x) x]
|
#define aco(x) x:
|
||||||
#d acc(x) x}
|
#define bco(x) :x
|
||||||
#d aco(x) x:
|
#define acp(x) x)
|
||||||
#d bco(x) :x
|
#define bef(x) EOF x
|
||||||
#d acp(x) x)
|
#define aeq(x) x=
|
||||||
#d bef(x) EOF x
|
#define afo(x) x for
|
||||||
#d aeq(x) x=
|
#define age(x) x fgetc
|
||||||
#d afo(x) x for
|
#define asi(x) x stdin
|
||||||
#d age(x) x fgetc
|
#define aso(x) x stdout
|
||||||
#d asi(x) x stdin
|
#define bgt(x) >x
|
||||||
#d aso(x) x stdout
|
#define ai(x) x i
|
||||||
#d bgt(x) >x
|
#define aj(x) x j
|
||||||
#d ai(x) x i
|
#define al(x) x l
|
||||||
#d aj(x) x j
|
#define ami(x) x-
|
||||||
#d al(x) x l
|
#define bne(x) !=x
|
||||||
#d ami(x) x-
|
#define aob(x) x[
|
||||||
#d bne(x) !=x
|
#define aop(x) x(
|
||||||
#d aob(x) x[
|
#define apl(x) x+
|
||||||
#d aop(x) x(
|
#define bpu(x) fputc x
|
||||||
#d apl(x) x+
|
#define bqm(x) ?x
|
||||||
#d bpu(x) fputc x
|
#define aqm(x) x?
|
||||||
#d bqm(x) ?x
|
#define aqu(x) x'
|
||||||
#d aqm(x) x?
|
#define ase(x) x;
|
||||||
#d aqu(x) x'
|
#define awh(x) x while
|
||||||
#d ase(x) x;
|
#define axo(x) x^
|
||||||
#d awh(x) x while
|
#define a0(x) x 0
|
||||||
#d axo(x) x^
|
#define b13(x) 13 x
|
||||||
#d a0(x) x 0
|
#define b16(x) 16 x
|
||||||
#d b13(x) 13 x
|
#define b19(x) 19 x
|
||||||
#d b16(x) 16 x
|
#define b48(x) 48 x
|
||||||
#d b19(x) 19 x
|
#define a64(x) x 64
|
||||||
#d b48(x) 48 x
|
#define b66(x) 66 x
|
||||||
#d a64(x) x 64
|
#define bcb(x) ]x
|
||||||
#d b66(x) 66 x
|
#define bch(x) char x
|
||||||
#d bcb(x) ]x
|
#define bcm(x) ,x
|
||||||
#d bch(x) char x
|
#define acm(x) x,
|
||||||
#d bcm(x) ,x
|
#define bcp(x) )x
|
||||||
#d acm(x) x,
|
#define beq(x) =x
|
||||||
#d bcp(x) )x
|
#define bex(x) extern x
|
||||||
#d beq(x) =x
|
#define bi(x) i x
|
||||||
#d bex(x) extern x
|
#define bin(x) int x
|
||||||
#d bi(x) i x
|
#define bix(x) index x
|
||||||
#d bin(x) int x
|
#define bj(x) j x
|
||||||
#d bix(x) index x
|
#define bl(x) l x
|
||||||
#d bj(x) j x
|
#define alt(x) x<
|
||||||
#d bl(x) l x
|
#define bma(x) main x
|
||||||
#d alt(x) x<
|
#define bob(x) [x
|
||||||
#d bma(x) main x
|
#define boc(x) {x
|
||||||
#d bob(x) [x
|
#define bop(x) (x
|
||||||
#d boc(x) {x
|
#define bpl(x) +x
|
||||||
#d bop(x) (x
|
#define app(x) x++
|
||||||
#d bpl(x) +x
|
#define bqu(x) 'x
|
||||||
#d app(x) x++
|
#define bse(x) ;x
|
||||||
#d bqu(x) 'x
|
#define bst(x) *x
|
||||||
#d bse(x) ;x
|
|
||||||
#d bst(x) *x
|
|
||||||
|
|
||||||
bma(acp(bop(app(bcp(ai(boc(ase(bch(a16(bl(alt(bob(ai(b66(ase(bcb(a0(bcm(aeq(bst(acb(bj(a64(bse(aob(bin(al(bi(aeq(bse(ai(bex(aop(bch(afo(bst(ase(bix(())))))))))))))))))))))))))))))))))))))))
|
bma(acp(bop(app(bcp(ai(boc(ase(bch(a16(bl(alt(bob(ai(b66(ase(bcb(a0(bcm(aeq(bst(acb(bj(a64(bse(aob(bin(al(bi(aeq(bse(ai(bex(aop(bch(afo(bst(ase(bix(())))))))))))))))))))))))))))))))))))))))
|
||||||
bl(ai(bob(aob(bi(al(bcb(aop(beq(apl(b13(a13(bpl(aeq(bop(acb(bl(bob(a32(bi(bpl(apl(b16(bcb(ai(beq(b19(aob(bpl(bop(l))))))))))))))))))))))))))))))
|
bl(ai(bob(aob(bi(al(bcb(aop(beq(apl(b13(a13(bpl(aeq(bop(acb(bl(bob(a32(bi(bpl(apl(b16(bcb(ai(beq(b19(aob(bpl(bop(l))))))))))))))))))))))))))))))
|
||||||
|
|||||||
+34
-59
@@ -328,66 +328,27 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
||||||
-Wno-logical-op-parentheses -Wno-parentheses -Wno-return-type \
|
-Wno-logical-op-parentheses -Wno-parentheses -Wno-return-type \
|
||||||
-Wno-shift-op-parentheses
|
-Wno-shift-op-parentheses
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-Wno-logical-op-parentheses -Wno-parentheses -Wno-return-type \
|
|
||||||
-Wno-shift-op-parentheses
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra ${CSILENCE}
|
CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-Wno-logical-op-parentheses -Wno-parentheses -Wno-return-type \
|
|
||||||
-Wno-shift-op-parentheses
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -399,12 +360,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -413,7 +374,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -426,7 +387,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -437,20 +398,34 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-prototypes \
|
||||||
|
-Wno-missing-variable-declarations -Wno-pedantic \
|
||||||
|
-Wno-poison-system-directories -Wno-shorten-64-to-32 -Wno-sign-conversion \
|
||||||
|
-Wno-strict-prototypes
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+32
-55
@@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
CSILENCE=
|
CSILENCE=
|
||||||
#CSILENCE= -Wno-implicit-int
|
#CSILENCE= -Wno-implicit-int
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
CSILENCE=
|
|
||||||
#CSILENCE= -Wno-implicit-int
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
CSILENCE=
|
|
||||||
#CSILENCE= -Wno-implicit-int
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -393,12 +358,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -407,7 +372,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -420,7 +385,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -431,20 +396,32 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#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-poison-system-directories -Wno-strict-prototypes
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+31
-55
@@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-invalid-pp-token -Wno-trigraphs
|
CSILENCE= -Wno-invalid-pp-token -Wno-trigraphs
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-invalid-pp-token -Wno-trigraphs
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-invalid-pp-token -Wno-trigraphs
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -393,12 +358,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -407,7 +372,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -420,7 +385,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -431,20 +396,31 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
CSILENCE+= -Wno-missing-variable-declarations -Wno-poison-system-directories
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+31
-55
@@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
CSILENCE=
|
CSILENCE=
|
||||||
#CSILENCE= -Wno-implicit-int
|
#CSILENCE= -Wno-implicit-int
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
CSILENCE=
|
|
||||||
#CSILENCE= -Wno-implicit-int
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
CSILENCE=
|
|
||||||
#CSILENCE= -Wno-implicit-int
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -393,12 +358,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -407,7 +372,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -420,7 +385,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -431,20 +396,31 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+32
-57
@@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
||||||
-Wno-unused-value
|
-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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-Wno-unused-value
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra ${CSILENCE}
|
CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -396,12 +359,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -410,7 +373,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -423,7 +386,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -434,20 +397,32 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-missing-variable-declarations \
|
||||||
|
-Wno-pedantic -Wno-poison-system-directories -Wno-strict-prototypes
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+34
-61
@@ -328,69 +328,28 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-deprecated-declarations -Wno-empty-body -Wno-error -Wno-unused-value \
|
CSILENCE= -Wno-deprecated-declarations -Wno-empty-body -Wno-error -Wno-unused-value \
|
||||||
-Wno-implicit-function-declaration -Wno-incompatible-pointer-types \
|
-Wno-implicit-function-declaration -Wno-incompatible-pointer-types \
|
||||||
-Wno-macro-redefined -Wno-parentheses -Wno-return-type -Wno-unused-parameter \
|
-Wno-macro-redefined -Wno-parentheses -Wno-return-type -Wno-unused-parameter \
|
||||||
-Wno-empty-translation-unit
|
-Wno-empty-translation-unit
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-deprecated-declarations -Wno-empty-body -Wno-error -Wno-unused-value \
|
|
||||||
-Wno-implicit-function-declaration -Wno-incompatible-pointer-types \
|
|
||||||
-Wno-macro-redefined -Wno-parentheses -Wno-return-type -Wno-unused-parameter \
|
|
||||||
-Wno-empty-translation-unit
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-deprecated-declarations -Wno-empty-body -Wno-error -Wno-unused-value \
|
|
||||||
-Wno-implicit-function-declaration -Wno-incompatible-pointer-types \
|
|
||||||
-Wno-macro-redefined -Wno-parentheses -Wno-return-type -Wno-unused-parameter \
|
|
||||||
-Wno-empty-translation-unit
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -402,12 +361,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -416,7 +375,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -429,7 +388,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -440,20 +399,34 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
CSILENCE+= -Wno-comma -Wno-double-promotion -Wno-float-conversion \
|
||||||
|
-Wno-missing-prototypes -Wno-missing-variable-declarations \
|
||||||
|
-Wno-poison-system-directories -Wno-shadow -Wno-strict-prototypes \
|
||||||
|
-Wno-unreachable-code -Wno-unused-macros
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
+31
-57
@@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib
|
|||||||
#X11_INCDIR= /usr/X11/include
|
#X11_INCDIR= /usr/X11/include
|
||||||
X11_INCDIR= /opt/X11/include
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# CWARN - Silence warnings that ${CWARN} would normally complain about
|
# Common C compiler warnings to silence
|
||||||
# CSILENCE -Compiler warnings
|
|
||||||
#
|
|
||||||
ifeq ($(CC),clang)
|
|
||||||
|
|
||||||
# clang CSILENCE and CWARN
|
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
#CSILENCE=
|
||||||
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
||||||
-Wno-unused-value -Wno-unused-variable
|
-Wno-unused-value -Wno-unused-variable
|
||||||
#
|
|
||||||
#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
|
# Common C compiler warning flags
|
||||||
ifeq ($(CC),gcc)
|
|
||||||
|
|
||||||
# gcc CSILENCE and CWARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-Wno-unused-value -Wno-unused-variable
|
|
||||||
#
|
#
|
||||||
#CWARN= ${CSILENCE}
|
#CWARN= ${CSILENCE}
|
||||||
#CWARN= -Wall ${CSILENCE}
|
#CWARN= -Wall ${CSILENCE}
|
||||||
#CWARN= -Wall -Wextra ${CSILENCE}
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
else
|
# Compiler standard
|
||||||
|
|
||||||
# default CSILENCE and WARN
|
|
||||||
#
|
|
||||||
#CSILENCE=
|
|
||||||
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
|
||||||
-Wno-unused-value -Wno-unused-variable
|
|
||||||
#
|
|
||||||
#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
|
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=gnu90
|
CSTD= -std=gnu90
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
@@ -396,12 +359,12 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE=
|
||||||
#CDEFINE= -DIOCCC=26
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE=
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
@@ -410,7 +373,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||||
|
|
||||||
# optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
@@ -423,7 +386,7 @@ CINCLUDE=
|
|||||||
#OPT= -O2
|
#OPT= -O2
|
||||||
OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# Default flags for ANSI C compilation
|
||||||
#
|
#
|
||||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
@@ -434,20 +397,31 @@ LIBS=
|
|||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
||||||
|
|
||||||
# ANSI compiler
|
# C compiler to use
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|||||||
Reference in new issue
Block a user