# This is GNU Make control file
# You need Hitech-C compiler and GNU sh-utils installed.
.SUFFIXES: .as .s .obj .lib
DESTDIR = ..
INC = -I..
LIB = ..
SCRIPTS = ..

OBJS = ldbas0.obj ldbas1.obj
OUT = $(OBJS)

all: $(OBJS)

ldbas0.s: ldbas.as
	cpp -DEXPORT= -DEXPEND= -DBASIC_HEADER $(INC) $< $@

ldbas1.s: ldbas.as
	cpp -DEXPORT= -DEXPEND= -DBASIC_ENDING $(INC) $< $@
	
.s.obj:
	sh -c 'zas -o$@ $< 2>&1'


install: $(OUT)
ifdef DESTDIR
	cp -f $(OUT) $(DESTDIR)
endif

uninstall:
ifdef DESTDIR
	rm -f $(OUT:%=$(DESTDIR)/%)
endif
	

clean:
	rm -f *.s

clean-all: clean
	rm -f $(OBJS)
	
