Skip to content

Commit 91d3e09

Browse files
committedDec 8, 2016
provide a Makefile.os2 (to be used with Watcom, tested with OpenWatcom 1.9)
1 parent c9c2095 commit 91d3e09

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed
 

‎Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
SUBDIRS = src
44

5-
EXTRA_DIST = CREDITS Changelog girl_from_mars.xm
5+
EXTRA_DIST = CREDITS Changelog girl_from_mars.xm os2/Makefile.os2 os2/unistd.h os2/usleep.c

‎os2/Makefile.os2

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Makefile for OS/2 using Watcom compiler.
2+
#
3+
# wmake -f Makefile.os2
4+
5+
CC=wcc386
6+
INCLUDES=-I..\os2 -I..\src
7+
CPPFLAGS=-DHAVE_SIGNAL_H -DHAVE_SYS_TIME_H
8+
CPPFLAGS+= -DSOUND_OS2DART
9+
CPPFLAGS+= -DVERSION="4.2.0"
10+
# for an exe using libxmp.dll: link to libxmp.lib
11+
# for a statically linked exe: link to xmp_static.lib
12+
LIBS=libxmp.lib mmpm2.lib
13+
#LIBS=xmp_static.lib mmpm2.lib
14+
CFLAGS = -bt=os2 -bm -fp5 -fpi87 -mf -oeatxh -w4 -zp8 -ei -q
15+
# -5s : Pentium stack calling conventions.
16+
# -5r : Pentium register calling conventions.
17+
CFLAGS+= -5s
18+
19+
.SUFFIXES:
20+
.SUFFIXES: .obj .c
21+
22+
AOUT=xmp.exe
23+
COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES)
24+
25+
OBJ = commands.obj getopt.obj getopt1.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_dart.obj terminal.obj usleep.obj
26+
27+
all: $(AOUT)
28+
29+
$(AOUT): $(OBJ)
30+
wlink N $(AOUT) SYS OS2V2 LIBR {$(LIBS)} F {$(OBJ)}
31+
32+
clean:
33+
FOR %F IN ( $(AOUT) $(OBJ) $(EXTRA_OBJ) ) DO IF EXIST %F ERASE %F
34+
35+
.c: ..\src
36+
.c.obj:
37+
$(COMPILE) -fo=$^@ $<

‎os2/unistd.h

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _XMP_OS2_UNISTD_H
2+
#define _XMP_OS2_UNISTD_H
3+
4+
#include <io.h> /* do not want Watcom unistd.h */
5+
6+
void usleep (unsigned long usec);
7+
8+
#endif

‎os2/usleep.c

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#define INCL_DOSPROCESS
2+
#include <os2.h>
3+
void usleep (unsigned long usec)
4+
{
5+
DosSleep(usec ? (usec/1000l) : 1l);
6+
}

0 commit comments

Comments
 (0)
Please sign in to comment.