#
# Makefile for Native FixHeader
# Makes FixHeader out of the various files...
#

VERSION = 39

OFILES = fixheader.o utilities.o processfile.o entab.o
CFILES = fixheader.c utilities.c processfile.c entab.c
HFILES = fixheader.h
MISCFILES = fixheader.ld fixheader.ld.strip fixheader.map lmkfile

LFLAGS = SMALLCODE SMALLDATA ADDSYM BATCH MAP fixheader.map X O H S F L plain
LLIBS = lib:lcr.lib lib:debug.lib

CFLAGS = -. -cfist -rr -v -ms -d -O

.c.o:
	lc $(CFLAGS) $*

all: fixheader_rev.rev fixheader.ld fixheader.ld.strip

fixheader.ld: fixheader_rev.rev $(OFILES)
	blink from lib:c.o $(OFILES) TO fixheader.ld $(LFLAGS) lib $(LLIBS)

fixheader.ld.strip: fixheader.ld
	blink from fixheader.ld to fixheader.ld.strip NODEBUG

fixheader_rev.rev: $(CFILES) $(HFILES)
	bumprev $(VERSION) fixheader_rev
	
fixheader.o: fixheader.c fixheader_rev.rev

clean:
	delete \#?.(o|lst)

internal:
	copy $(CFILES) V$(VERSION):aug/src/fixheader nopro
	copy $(HFILES) V$(VERSION):aug/src/fixheader nopro
	copy $(MISCFILES) V$(VERSION):aug/src/fixheader nopro
	copy fixheader.ld.strip V$(VERSION):aug/bin/fixheader nopro
