# This builds a PDOS-generic executable

CC=gcc386
COPTS=-S -O2 -D__PDOS386__ -D__PDOSGEN__ -D__NOBIVA__ -I . -I../pdpclib -I../src

all: clean pcomm.exe

pcomm.exe: ../pdpclib/pgastart.o pcomm.o
  rm -f pcomm.exe
  ld386 -N -s -e ___crt0 -o pcomm.exe ../pdpclib/pgastart.o pcomm.o

.c.o:
  $(CC) $(COPTS) -o $*.s $<
  as386 -o $@ $*.s
  rm -f $*.s

.asm.obj:
  as386 -o $@ $<

clean:
  rm -f pcomm.exe
