Category : OS/2 Files
Archive   : WHICH100.ZIP
Filename : MAKEFILE.OS2

 
Output of file : MAKEFILE.OS2 contained in archive : WHICH100.ZIP

# Makefile for which 11 March 1993
#
# - for Microsoft C under OS/2 1.x (16-bit), version 6.00 or higher
# - for IBM C/C++ Set/2 under OS/2 2.0 (32-bit)
# - for Watcom C/386 under OS/2 2.0 (32-bit), version 9.0 or higher
# - for GNU gcc (emx kit) under OS/2 2.0 (32-bit), version 0.8e or higher
# - for Borland C++ beta (TOPAZ)
#
# To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
# name being "makefile.os2").
#
# Notes on Microsoft C 6.00 compilation:
# The resulting programs can be used under OS/2 1.x or 2.x
# protected mode only, not under DOS. A larger stack has to
# be used for OS/2 because system calls use more stack than
# under DOS; 8k is recommended by Microsoft.
#
# Notes on IBM C Set/2, Watcom C/386, Borland C++ or gcc compilation:
# The resulting programs can be used under OS/2 protected
# mode of OS/2 2.0 only, not under 1.x and not under DOS.

default:
@echo "Enter $(MAKE) -f makefile.os2 target"
@echo "where target is one of:"
@echo " msc mscdos ibm ibmdyn ibmprof ibmdebug"
@echo " watcom gcc gccdyn gccdebug borland"

# crosscompilation for MS-DOS with MS C 6.00
mscdos:
$(MAKE) -f makefile.os2 all \
CC="cl -nologo -AS -Oaict -Gs $(FP)" \
CFLAGS="-Zp1" \
LDFLAGS="-F 2000 -Lr -Fe" \
LDFLAGS2="-link /noe /exe" \
OUT="-Fo" \
OBJ=".obj"

# MS C 6.00 for OS/2, 16-bit
msc:
$(MAKE) -f makefile.os2 all \
CC="cl -nologo -AS -Ocegit -Gs $(FP)" \
CFLAGS="-G2 -Zp1 -DOS2 -DMSC" \
LDFLAGS="-F 2000 -Lp -Fe" \
LDFLAGS2="-link /noe /pm:vio" \
OUT="-Fo" \
OBJ=".obj" \
DEF="which.def"

# IBM C Set/2, statically linked runtime
ibm:
$(MAKE) -f makefile.os2 all \
CC="icc -Q -O -Gs" \
CFLAGS="-Sm -Sp1 -DOS2" \
LDFLAGS="-Fe" \
LDFLAGS2="" \
OUT="-Fo" \
OBJ=".obj" \
DEF="which.def"

# IBM C Set/2, dynamically linked runtime
ibmdyn:
$(MAKE) -f makefile.os2 all \
CC="icc -Q -O -Gs -Gd" \
CFLAGS="-Sm -Sp1 -DOS2" \
LDFLAGS="-Fe" \
LDFLAGS2="" \
OUT="-Fo" \

OBJ=".obj" \
DEF="which.def"

# IBM C Set/2, debug version
ibmdebug:
$(MAKE) -f makefile.os2 all \
CC="icc -Q -Ti" \
CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2" \
LDFLAGS="-Fe" \
LDFLAGS2="" \
OUT="-Fo" \
OBJ=".obj" \
DEF="which.def"

# IBM C Set/2, profiling version for PROFIT
ibmprof:
$(MAKE) -f makefile.os2 all \
CC="icc -Q -O -Gs -Gh -Ti" \
CFLAGS="-Sm -Sp1 -DOS2" \
LDFLAGS="-Fe" \
LDFLAGS2="profit.obj" \
OUT="-Fo" \
OBJ=".obj" \
DEF="which.def"

# Watcom C/386 9.0
watcom:
$(MAKE) -f makefile.os2 all \
CC="wcl386 -zq -Ox -s" \
CFLAGS="-Zp1 -DOS2" \
LDFLAGS="-k0x40000 -x -Fe=" \
LDFLAGS2="" \
OUT="-Fo" \
OBJ=".obj" \
DEF=""

# Borland C++ beta (TOPAZ)
borland:
$(MAKE) -f makefile.os2 all \
CC="bcc -O" \
CFLAGS="-w- -DOS2" \
LDFLAGS="-e" \
LDFLAGS2="" \
OUT="-o" \
OBJ=".obj" \
DEF=""

# emx 0.8f, gcc, OMF format, statically linked C runtime and emx
gcc:
$(MAKE) -f makefile.os2 all \
CC="gcc -Zomf -Zsys -O" \
CFLAGS="-DOS2" \
LDFLAGS="-o ./" \
LDFLAGS2="-s -los2" \
OUT="-o" \
OBJ=".obj" \
DEF="which.def"

# emx 0.8f, gcc, OMF format, dynamically linked C runtime and emx
gccdyn:
$(MAKE) -f makefile.os2 all \
CC="gcc -Zomf -Zmt -O" \
CFLAGS="-DOS2" \
LDFLAGS="-o ./" \
LDFLAGS2="-s -los2" \
OUT="-o" \
OBJ=".obj" \
DEF="which.def"

# emx, gcc, a.out format, with debug info for gdb
gccdebug:
$(MAKE) -f makefile.os2 all \
CC="gcc -g" \
CFLAGS="-DOS2" \
LDFLAGS="-o ./" \
LDFLAGS2="-los2" \
OUT="-o" \
OBJ=".o"

# variables
OBJS = which$(OBJ)

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

all: which.exe

which.exe: $(OBJS) $(DEF)
$(CC) $(LDFLAGS)[email protected] $(DEF) $(OBJS) $(LDFLAGS2)

which$(OBJ): which.c