You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.3 KiB
67 lines
1.3 KiB
TARGET=orca_tui
|
|
|
|
LANG_VERSION=c99
|
|
|
|
# Build option defaults
|
|
PREFIX?=/opt/local
|
|
DEBUG?=1
|
|
PORTMIDI_ENABLED?=1
|
|
MOUSE_ENABLED?=1
|
|
|
|
CFLAGS+=\
|
|
-finput-charset=UTF-8 \
|
|
-Wall \
|
|
-Wpedantic \
|
|
-Wextra \
|
|
-Wwrite-strings \
|
|
-Wconversion \
|
|
-Wshadow \
|
|
-Wstrict-prototypes \
|
|
-Werror=implicit-function-declaration \
|
|
-Werror=implicit-int \
|
|
-Werror=incompatible-pointer-types \
|
|
-Werror=int-conversion \
|
|
-Wno-missing-field-initializers \
|
|
-DORCA_OS_MAC \
|
|
-D_XOPEN_SOURCE_EXTENDED=1 \
|
|
-march=nehalem \
|
|
-fcolor-diagnostics
|
|
|
|
LDFLAGS_NCURSES=$(shell pkg-config --libs ncursesw formw)
|
|
LDFLAGS+=$(LDFLAGS_NCURSES)
|
|
|
|
|
|
######### Overrides from build.conf #########
|
|
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
-include $(HERE)build.conf
|
|
|
|
CFLAGS+=-std=$(LANG_VERSION)
|
|
CFLAGS+=-I$(PREFIX)/include
|
|
LDFLAGS+=-L$(PREFIX)/lib
|
|
|
|
ifeq ($(DEBUG),1)
|
|
CFLAGS+=\
|
|
-g \
|
|
-O0 \
|
|
-DDEBUG \
|
|
# -fsanitize=address \
|
|
# -fsanitize=undefined \
|
|
# -fsanitize=float-divide-by-zero \
|
|
# -fsanitize=implicit-conversion \
|
|
# -fsanitize=unsigned-integer-overflow
|
|
else
|
|
CFLAGS+=\
|
|
-DNDEBUG \
|
|
-O2 \
|
|
-g0
|
|
endif
|
|
|
|
ifeq ($(PORTMIDI_ENABLED),1)
|
|
LDFLAGS+= -lportmidi
|
|
CFLAGS+= -DFEAT_PORTMIDI
|
|
endif
|
|
|
|
ifeq ($(MOUSE_ENABLED),0)
|
|
CFLAGS+=-DFEAT_NOMOUSE
|
|
endif
|
|
|
|
|