Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions config.mk.def
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# config.mk - makefile configuration for sam
# copyright 2015 Rob King <jking@deadpixi.com>

# Get OS for specific dependencies
UNAME := $(shell uname)

# CC is the C compiler to use
CC=gcc
CFLAGS?=
Expand All @@ -9,10 +12,13 @@ CFLAGS+=-std=c99
# STANDARDS names the C preprocessor defines that need to
# be present to get a more-or-less standard compilation
# environment.
#
# Mac OS X users need to add -D_DARWIN_C_SOURCE here.
STANDARDS=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500

ifeq ($(UNAME), Darwin)
OSVERSION := $(shell sw_vers | awk '($$1 = /ProductVersion:/){ ($$2 < 10.7) ? source = "-D_ANSI_SOURCE" : source = "-D_DARWIN_C_SOURCE"; print source }')
STANDARDS+=$(OSVERSION)
endif

# DESTDIR is the root of the installation tree
DESTDIR?=/usr/local

Expand All @@ -23,11 +29,15 @@ BINDIR?=$(DESTDIR)/bin
MANDIR?=$(DESTDIR)/share/man/

# Add additional include and library directories
# BSD/Mac OS X users might need to add something like
# INCLUDES=-I/usr/X11R6/include -I/usr/X11R6/include/freetype2
# LDFLAGS=-L/usr/X11R6/lib
INCLUDES=-I/usr/include/freetype2
INCLUDES=
LDFLAGS=

ifeq ($(UNAME), Darwin)
INCLUDES+=-I/usr/X11R6/include -I/usr/X11R6/include/freetype2
LDFLAGS+=-L/usr/X11R6/lib
else
INCLUDES+=-I/usr/include/freetype2
endif

# Set this to your default remote shell.
RXPATH=/usr/bin/ssh