# Makefile for "cal" (tested with dmake 3.8)                     25 July 1993
#
# - for GNU gcc (emx 0.8g kit) under OS/2 2.0 (32-bit)
# - for Microsoft C 6.00 under OS/2 or MSDOS (16-bit)

# To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
# name being "makefile.os2").

default:
	@echo Enter "$(MAKE) -f Makefile.os2 emx"
	@echo    or "$(MAKE) -f Makefile.os2 msc"
	@echo    or "$(MAKE) -f Makefile.os2 mscbnd"


emx:  
	$(MAKE) -f Makefile.os2 all \
	CC="gcc -Zomf -Zmtd -O -s" O=".obj" \
	CFLAGS="-DOS2" \
	LFLAGS="" \
	LFLAGS2="cal-32.def"
	
msc: 
	$(MAKE) -f Makefile.os2 all \
	CC="cl -nologo -AS" O=".obj" \
	CFLAGS="-DOS2 -UMSDOS" \
	LFLAGS="-Lp" \
	LFLAGS2="cal.def"

mscbnd: 
	$(MAKE) -f Makefile.os2 all \
	CC="cl -nologo -AS" O=".obj" \
	CFLAGS="-DOS2 -UMSDOS" \
	LFLAGS="-Lp -Fb" \
	LFLAGS2="cal.def"


all : cal.exe

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

cal.exe : cal$O
	$(CC) -o $@ $(LFLAGS) $< $(LFLAGS2)
