# Makefile for the Caml Light librarian.

CAMLCOMP=../camlrun ../camlcomp
CAMLLINK=../camlrun ../camllink
INCLUDES=-stdlib ../lib -I ../compiler -I ../linker
COMPFLAGS=-O fast $(INCLUDES)
LINKFLAGS=-g $(INCLUDES)

EXTERNOBJS=config.zo misc.zo readword.zo 

OBJS=librar.zo version.zo main.zo

all: camllibr

camllibr: $(OBJS)
	$(CAMLLINK) $(LINKFLAGS) -o camllibr stdlib.zo -files &&!
$(EXTERNOBJS) $(OBJS)
!

clean:
	del *.zi
	del *.zo
	del camllibr
	del makefile.bak

install:
	..\tools\installb camllibr $(BINDIR)\camllibr

.mli.zi:
	$(CAMLCOMP) $(COMPFLAGS) {$< }
.ml.zo:
	$(CAMLCOMP) $(COMPFLAGS) {$< }

depend:
	del makefile.bak
	ren makefile makefile.bak
	perl ../tools/cutdeps makefile.bak > makefile
	perl ../tools/camldep -I ../compiler -I ../linker >> makefile

### EVERYTHING THAT GOES BEYOND THIS COMMENT IS GENERATED
### DO NOT DELETE THIS LINE
main.zo: librar.zo version.zo 
