# Makefile for GNU DIFF with Watcom C 9.x under OS/2 2.x

dos4gw:
	$(MAKE) all CC="wcl386 -Zp1 -Ox -s -l=dos4g" O=.obj
release:
	$(MAKE) all CC="wcl386 -Zp1 -Ox -s -l=os2v2" O=.obj
debug:
	$(MAKE) all CC="wcl386 -Zp1 -Od -d2" O=.obj

CFLAGS= -I. -DUSG -DOS2 -DHAVE_CONFIG_H
LIBS =	-k0x100000

DIFF =	diff$O analyze$O io$O context$O ed$O normal$O util$O dir$O fnmatch$O \
	getopt$O getopt1$O ifdef$O side$O version$O dirent$O cmpbuf$O
REGEX = regex$O

.SUFFIXES: .c $O

.c$O:
	$(CC) $(CFLAGS) -c $<

all: diff.exe

diff.exe: $(DIFF) $(REGEX)
	$(CC) $(DIFF) $(REGEX) -Fe=$@ $(LIBS)

$(DIFF): diff.h

context$O diff$O: regex.h

dirent$O: dirent.c dirent.h
	$(CC) -I. -D__32BIT__ -c dirent.c
