# Makefile fr ps.exe
# This is the makefile for ps.exe

CFLAGS=-O -Wall
CC=gcc

default: ps.c ps.h ps.o ps.a
        $(CC) $(CFLAGS) -s -o ps.exe ps.o ps.a ps.def -Zmtd

omf: ps.c ps.h ps.obj ps.lib
# Benutze den Linker von OS/2 (ergibt ein krzers Programm und luft auch
# ohne emx.dll):
# Use the OS/2 linker (link386) after compiling (this option produces a
# shorter executable file und you don't need the libary emx.dll to run ps)
        $(CC) $(CFLAGS) -s -o ps.exe ps.obj ps.lib ps.def -Zomf -Zsys

clear:
        del ps.o ps.obj ps.imp ps.a ps.lib
ps.o: ps.c ps.h
        $(CC) $(CFLAGS) -c ps.c
ps.a: ps.imp
        emximp -o ps.a ps.imp
ps.obj:ps.c ps.h
        $(CC) $(CFLAGS) -c ps.c -Zomf
ps.lib: ps.imp
        emximp -o ps.lib ps.imp
ps.imp:
        echo ; ps import file >ps.imp
        echo +psimp.s >>ps.imp
        echo DosQProcStatus doscalls 154 F >>ps.imp
