Makefile 2.36 KB
#!smake
#
# Makefile for vi library subdirectory
#

SUBDIR=vi

COMMONPREF=$(SUBDIR)

PRDEPTH=$(ROOT)/PR
include $(PRDEPTH)/PRdefs

LIBDEPTH=$(ROOT)/PR/libultra
include $(LIBDEPTH)/libdefs

sinclude ../companydefs

LCOPTS = -non_shared -mips2 -fullwarn -G 0 -wlint,-f -woff 819,826,852
LCINCS = -I. -I$(LIBDEPTH)/include -I$(PRDEPTH)/include

VI      =   ../$(COMPANY)/vi
VIFILES = vi.c vigetcurrcontext.c vigetfield.c vigetcurrframebuf.c \
	vigetnextframebuf.c vigetline.c vigetmode.c vigetnextcontext.c \
	vigetstat.c vimgr.c visetevent.c visetmode.c visetspecial.c \
	visetxscale.c visetyscale.c viswapbuf.c viswapcontext.c vitbl.c \
	viblack.c virepeatline.c vifade.c viextendvstart.c

VIMODEFILES=	\
	vimodentsclpn1.c vimodentsclpf1.c vimodentsclan1.c vimodentsclaf1.c\
	vimodentsclpn2.c vimodentsclpf2.c vimodentsclan2.c vimodentsclaf2.c\
	vimodentschpn1.c vimodentschpf1.c vimodentschan1.c vimodentschaf1.c\
	vimodentschpn2.c vimodentschpf2.c \
	vimodepallpn1.c  vimodepallpf1.c  vimodepallan1.c  vimodepallaf1.c\
	vimodepallpn2.c  vimodepallpf2.c  vimodepallan2.c  vimodepallaf2.c\
	vimodepalhpn1.c  vimodepalhpf1.c  vimodepalhan1.c  vimodepalhaf1.c\
	vimodepalhpn2.c  vimodepalhpf2.c \
	vimodempallpn1.c vimodempallpf1.c vimodempallan1.c vimodempallaf1.c\
	vimodempallpn2.c vimodempallpf2.c vimodempallan2.c vimodempallaf2.c\
	vimodempalhpn1.c vimodempalhpf1.c vimodempalhan1.c vimodempalhaf1.c\
	vimodempalhpn2.c vimodempalhpf2.c \
	vimodefpallpn1.c vimodefpallpf1.c vimodefpallan1.c vimodefpallaf1.c\
	vimodefpallpn2.c vimodefpallpf2.c vimodefpallan2.c vimodefpallaf2.c\
	vimodefpalhpn1.c vimodefpalhpf1.c vimodefpalhan1.c vimodefpalhaf1.c\
	vimodefpalhpn2.c vimodefpalhpf2.c 

CFILES = $(VIFILES) $(VIMODEFILES)

LDIRT = $(VIMODEFILES) vimodesplit

sinclude locdefs

include $(LIBDEPTH)/librules

include $(PRDEPTH)/PRrules

install! default

clobber clean: $(_FORCE)
	@for i in $(TARGETS) ; do \
		cd $(LIBDEPTH)/$$i ; \
		$(MAKE) -f $(LIBDEPTH)/$(COMPANY)/$(SUBDIR)/Makefile rmldirt ;\
	done

rmldirt: $(_FORCE)
	rm -rf $(LDIRT)

$(VIMODEFILES):		vimodesplit

#
# We need to duplicate vitbl.c since it needs to be compiled differently for
# libultra
#
vimodesplit:	$(VI)/vimodesplit.c $(VI)/vitbl.c
	cp $(VI)/vitbl.c $(VI)/vitbl_x.c
	$(CC) -o $@ -D_DEBUG -I$(ROOT)/PR/include -I$(LIBDEPTH)/include \
		$(VI)/vimodesplit.c $(VI)/vitbl_x.c; 
	rm -f vitbl_x.o vimodesplit.o $(VI)/vitbl_x.c
	./vimodesplit