Makefile 1.8 KB
#!smake
#
# Makefile for graphics utility library subdirectory
#

SUBDIR=gu

COMMONPREF=$(SUBDIR)

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

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

sinclude ../companydefs

LCOPTS = -non_shared -mips2 -fullwarn -G 0
LCINCS = -I. -I$(LIBDEPTH)/include -I$(PRDEPTH)/include

LASOPTS=-non_shared -mips2 -G 0

HFILES = guint.h

CFILES	=			\
	align.c			\
	cosf.c			\
	coss.c			\
	frustum.c		\
	guLoadTile_bug.c	\
	loadtextureblockmipmap.c\
	lookat.c		\
	lookathil.c		\
	lookatref.c		\
	lookatstereo.c		\
	ortho.c			\
	perspective.c		\
	position.c		\
	poslight.c		\
	poslighthil.c		\
	random.c		\
	rotateRPY.c		\
	sinf.c			\
	sins.c			\
	us2dex.c		\
	us2dex_emu.c		\
	us2dex2_emu.c		\
	usprite.c

ASFILES	=			\
	libm_vals.s		\
	sqrtf.s

ADDFILES =			\
	mtxcatf.c		\
	mtxcatl.c		\
	mtxutil.c		\
	scale.c			\
	translate.c		\
	normalize.c		\
	rotate.c

LDIRT = ./maketable ./sintable.h

sins.o:	./sintable.h

./sintable.h:	./maketable
		./maketable > $@

./maketable:	maketable.c
		$(CC) $(LIBDEPTH)/$(COMPANY)/$(SUBDIR)/maketable.c -o $@ -lm

sinclude locdefs

#if $(LIBNAME) != "ULTRA_ROM"
CFILES += parse_rdp.c  parse_gbi.c dump_gbi.c parse_string.c
#endif

include $(LIBDEPTH)/librules

include $(PRDEPTH)/PRrules

install! default
	$(INSTALL) -m 444 -F /usr/src/PR/libsrc/libultra/gu $(SOURCES)
	$(INSTALL) -m 444 -F /usr/src/PR/libsrc/libultra/gu $(ADDFILES)
	$(INSTALL) -m 444 -F /usr/src/PR/libsrc/libultra/gu \
		-src ../../libultra/sintable.h sintable.h
	$(INSTALL) -m 444 -F /usr/src/PR/libsrc/libultra/gu \
		-src Makefile.src Makefile
	$(INSTALL) -m 444 -F /usr/src/PR/libsrc/libultra/gu readme.txt

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

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