
#
# Portable Object Compiler
# $Id: Makefile.lcc,v 1.1.1.1 1999/03/22 21:48:43 stes Exp $
#

#
# This Makefile should work with LCC make 
#

.SILENT:

MKDIR=mkdir
OBJC=objc
RM=del
CP=copy
AR=lcclib
FINAL_AR=echo
RANLIB=echo
MAKE=make
DBG_MFLAGS=-q -g
OPT_MFLAGS=-q -DNDEBUG
OBJSUFFIX=obj
LIBSUFFIX=lib
BOOTDIR=..\..
LIBDIR=$(BOOTDIR)\lib
BINDIR=$(BOOTDIR)\bin
IFLAGS=-noI
MFLAGS=$(OPT_MFLAGS)

.SUFFIXES: .m 

LIBRARY=objcrt.lib
DLL=objcrt.dll

OBJFILES=\
	Object.obj\
	Block.obj\
	Message.obj\
	objcrt.obj

.m.obj:
	$(OBJC) -c $*.m $(MFLAGS) $(IFLAGS)

ALL : $(LIBRARY)

$(LIBRARY) : $(OBJFILES)
	$(AR) /OUT:$(LIBRARY) $(OBJFILES)
	$(RANLIB) $(LIBRARY)

$(DLL) : $(OBJFILES)
	$(OBJC) -dl $(OBJFILES) -o $(DLL)
	implib $(DLL)
	$(CP) objcrt.lib objcrt_s.lib
	$(RM) objcrt.lib 

bootstrap :
	-$(MKDIR) $(LIBDIR)
	-$(MKDIR) $(BINDIR)
	-$(CP) $(LIBRARY) $(LIBDIR)

cleantmp :
	-$(RM) *.P
	-$(RM) *.c
	-$(RM) *.i

clean : cleantmp
	-$(RM) *.obj
	-$(RM) *.lib

distclean : clean
	-$(RM) Makefile 
	-$(RM) config.h 

