GNUmakefile 1.53 KB
#!smake
#
# Makefile for error library subdirectory
#

SUBDIR=error

COMMONPREF=$(SUBDIR)

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

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

sinclude ../companydefs
sinclude locdefs

#LCOPTS = -non_shared -mips2 -fullwarn -G 0 -wlint,-f -woff 819,826,852,821,827
LCOPTS = -non_shared -mips2 -Wall -G 0 
LCINCS = -I. -I$(LIBDEPTH)/include -I$(PRDEPTH)/include  -I$(PRDEPTH)/libultra/monegi/libc

FLAGS  = $(LCDEFS) $(LCINCS) -non_shared -G 0 -mips3 -32bit -c $(GCFLAGS)
#FLAGS2 = $(LCDEFS) $(LCINCS) -G 0 $(GCFLAGS) -woff 819,826,852,821,827
FLAGS2 = $(LCDEFS) -I$(ROOT)/host_include $(LCINCS)

LASOPTS	  = -non_shared -G 0 -mips2
LASINCS	  = -I. -I$(PRDEPTH)/include

CFILES = getcurrfaultthread.c getnextfaultthread.c 
ASFILES =

#if $(LIBNAME) != "ULTRA" && $(LIBNAME) != "ULTRA_ROM"
ifeq "$(LIBNAME)" "ULTRA_D"
CFILES += seterrorhandler.c commonerror.c
ASFILES += errorasm.s 
endif
#endif

LDIRT = mkerror oserror.h

include $(LIBDEPTH)/librules

include $(PRDEPTH)/PRrules

commonerror.o: oserr.h commonerror.c

mkerror.o:		mkerror.c
		$(HOST_CC) $(FLAGS2) -o $@  -c $?

sub.o:	sub.c
		$(HOST_CC) $(FLAGS2) -o $@  -c $?

mkerror : mkerror.o sub.o
		$(HOST_CC) $(FLAGS2) mkerror.o sub.o -o $@

oserr.h : mkerror $(PRDEPTH)/lib/error/error.fmt
		./mkerror $(PRDEPTH)/lib/error/error.fmt -o oserr.h

install: default

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

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