#  Makefile definitions from config/unix/x86_64_linux

#  CC       C compiler
#  CFLAGS   flags for building C files
#  CFDYN    additional flags for dynamic functions
#  RLINK    flags for linking run-time system
#  RLIBS    libraries to link with run-time system
#  XLIBS    libraries to link for graphics
#  XPMDEFS  definitions for building XPM library

# Note: -lsocket is not available on some Linux systems,
# but if your system has it you might need to add it to RLIBS

LIBS = -L/usr/lib64 $(AC_JV_LDFLAGS) $(AC_GL_LDFLAGS) $(AC_LIBS) -lm
CC = gcc
# Useful development flags: -g -Wall -Wno-missing-braces -fsanitize=address -fno-omit-frame-pointer
# -g and -fsanitize=address should also be added to the linker flags
# make sure to also change the optimization to level 0 or 1

CFLAGS = -02 -fno-strict-aliasing -fno-unit-at-a-time -I../libtp -I../gdbm -I../xpm $(AC_GL_CFLAGS) -I/usr/X11R6/include
LDFLAGS= -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu $(AC_LDFLAGS)
CFDYN = -fPIC -shared
RLINK = -rdynamic -Wl,-E -L../../bin -L/usr/lib64 $(AC_LDFLAGS)
RLIBS = -ltp $(LIBS) -L../../bin -lm -lgdbm -lnsl -ldl -lcrypt
XLIBS = -L/usr/X11R6/lib64 
XPMDEFS = -DZPIPE
GDBM=gdbm
LIBTP=libtp
