GNUmakefile 2.03 KB
#!smake
#
# Makefile for
#	GBI (graphics binary interface) header file
#	Emulator header files
#	Graphics Utility header files
#

PRDEPTH = ..
include $(PRDEPTH)/PRdefs
GCINCS==-D_LANGUAGE_C

GENHEADERS = sptaskoff.h gtoff.h

HFILES= R4300.h bcp.h bbnand.h bbnvram.h bbsim.h bbdebug.h \
	bbfs.h bbtypes.h bbvirage.h bbticket.h bbmetadata.h bbcert.h\
	bbcrl.h bbskapi.h  abi.h gbi.h mbi.h rsp.h \
	rsp_ipc.h em.h gu.h os.h os_internal.h sp.h region.h libaudio.h \
	verify.h ramrom.h rcp.h ultratypes.h trace.h dbgdefs.h dbgproto.h \
	rmon.h sptask.h driverd.h PRimage.h ucode.h ultraerror.h ultralog.h \
	audiotools.h uportals.h sched.h rdb.h gt.h \
	leoappli.h leo.h leosp.h gs2dex.h gzsort.h ucode_debug.h

# separated os.h
HFILES += os_ai.h os_bb.h os_bbcard.h os_bbfs.h os_bbatb.h os_bbexec.h  \
        os_bbsa.h os_cache.h os_cont.h os_convert.h os_debug.h	        \
	os_eeprom.h os_error.h os_exception.h os_gbpak.h os_gio.h	\
	os_host.h os_message.h os_motor.h os_pfs.h os_pi.h os_rdp.h	\
	os_reg.h os_rsp.h os_si.h os_system.h os_thread.h os_time.h	\
	os_tlb.h os_vi.h os_voice.h os_libc.h os_version.h os_flash.h	\
	os_usb.h 

# separated os_internal.h
HFILES += os_internal_reg.h os_internal_exception.h os_internal_tlb.h	\
	os_internal_si.h os_internal_rsp.h os_internal_error.h		\
	os_internal_gio.h os_internal_thread.h os_internal_debug.h	\
	os_internal_host.h

LDIRT=	$(GENHEADERS) taskoff gtoff

default: 

include $(COMMONRULES)

.NOTPARALLEL:
headers install: install1 install2

install1: $(_FORCE)
	$(INSTALL) -m 444 -F $(HOST_INC) ultra64.h ultrahost.h bbcard.h
	$(INSTALL) -m 444 -F /usr/include ultra64.h ultrahost.h bbcard.h
	$(INSTALL) -m 444 -F /usr/include/PR $(HFILES)

install2: $(GENHEADERS) $(_FORCE)
	$(INSTALL) -m 444 -F /usr/include/PR $(GENHEADERS)
	ln -sf $(ROOT)/usr/include/PR $(ROOT)/host_include/.

taskoff: taskoff.c sptask.h
	$(HOST_CCF) -o taskoff -I$(ROOT)/usr/include taskoff.c

sptaskoff.h: taskoff
	./taskoff > sptaskoff.h

gtoff: gtoff.c gt.h
	$(HOST_CCF) -o gtoff -I$(ROOT)/usr/include gtoff.c

gtoff.h: gtoff
	./gtoff > gtoff.h