blob: 4bd232bbbe7d3c98e5056b8806bd343157207906 [file] [log] [blame] [raw]
#
# DOSMid Makefile targeting UNIX-like systems
# Copyright 2015-2024 Rivoreo
#
# Enable OPL and OPLLPT output supports
FEATURES += -D OPL=1 -D OPLLPT=1
# Enable CMS and CMSLPT output supports
FEATURES += -D CMS=1 -D CMSLPT=1
# Enable wide-character support, requires wide-character-enabled curses
FEATURES += -D WCHAR=1
# Configure the default output device for use when no device option specified
# and no GUS and MPU configured via environment
DEFAULT_DEVICE := \
-D DOSMID_DEFAULT_DEVICE_TYPE=DEV_OPL \
-D DOSMID_DEFAULT_DEVICE_PORT=0x388
# May need for some versions of GNU C Library
#CFLAGS += -D _XOPEN_SOURCE=600
# May need for some old versions of Ncursesw
#CFLAGS += -D _XOPEN_SOURCE_EXTENDED=1
#CFLAGS += -I /usr/include/ncursesw
CFLAGS += -Wall -Wno-switch -Os -fno-common
CFLAGS += -D __far= -D __near= -D far= -D near= $(CPPFLAGS) $(FEATURES) $(DEFAULT_DEVICE)
#LIBS += -l rt
CURSES_LIBS ?= -l curses
#CURSES_LIBS ?= -l ncurses
#CURSES_LIBS ?= -l ncursesw
OBJECTS := \
cms.o \
dosmid.o \
fio.o \
lpt.o \
mem.o \
midi.o \
mpu401.o \
mus.o \
opl.o \
outdev.o \
sbdsp.o \
syx.o \
timer.o \
ui.o \
unixpio.o
dosmid: $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(CURSES_LIBS) $(LIBS)
clean:
rm -f $(OBJECTS) dosmid