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.
 
 
 
 
 
 

61 lines
1.4 KiB

# Makefile for Win32 using Watcom compiler.
#
# wmake -f Makefile.w32
# - builds using libxmp.dll and its import lib (libxmp.lib)
#
# wmake -f Makefile.w32 target=static
# - builds using the static library xmp_static.lib
#
!ifndef target
target = dll
!endif
!ifndef libxmp_path
libxmp_path = ../libxmp
!endif
CC=wcc386
SYSTEM=nt
CPPFLAGS=-DHAVE_SIGNAL_H -DHAVE_STRINGS_H
CPPFLAGS+= -DSOUND_WIN32
INCLUDES=-I"src/win32" -Isrc -I"$(%WATCOM)/h" -I"$(%WATCOM)/h/nt"
!ifeq target static
CPPFLAGS+= -DBUILDING_STATIC
LIBXMP=$(libxmp_path)/xmp_static.lib
!else
LIBXMP=$(libxmp_path)/libxmp.lib
!endif
INCLUDES+= -I"$(libxmp_path)/include"
LIBS=$(LIBXMP)
# for sound_win32:
LIBS+= winmm.lib
CFLAGS = -bt=nt -bm -fp5 -fpi87 -mf -oeatxh -w4 -zp8 -ei -q
# newer OpenWatcom versions enable W303 by default.
CFLAGS += -wcd=303
# -5s : Pentium stack calling conventions.
# -5r : Pentium register calling conventions.
CFLAGS+= -5s
.SUFFIXES:
.SUFFIXES: .obj .c
AOUT=xmp.exe
COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES)
OBJ = commands.obj delay.obj getopt_long.obj info.obj main.obj options.obj read_config.obj sound.obj sound_aiff.obj sound_file.obj sound_null.obj sound_wav.obj sound_win32.obj terminal.obj
all: $(AOUT)
$(AOUT): $(OBJ) $(LIBXMP)
wlink N $(AOUT) SYS $(SYSTEM) OP QUIET LIBR {$(LIBS)} F {$(OBJ)}
.c: src
.c.obj:
$(COMPILE) -fo=$^@ $<
distclean: clean .symbolic
rm -f $(AOUT) *.err
clean: .symbolic
rm -f *.obj