GNUmakefile 1.48 KB
#!smake
#
# Makefile for exception library subdirectory
#

SUBDIR=exception

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
LCOPTS = -non_shared -mips2 -Wall -G 0
LCINCS = -I. -I$(LIBDEPTH)/include -I$(PRDEPTH)/include

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

CFILES = sethwinterrupt.c gethwinterrupt.c setpiinterrupt.c \
		setglobalintmask.c resetglobalintmask.c

ASFILES = exceptasm.s interrupt.s setintmask.s getintmask.s 

LDIRT = makethreadasm ./threadasm.h

exceptasm.o:	exceptasm.s
#	$(AS) $(LASDEFS) $(LASINCS) -non_shared -G 0 -mips3 -32 \
	$(GASFLAGS) -o $@ $(LIBDEPTH)/$(COMPANY)/$(SUBDIR)/exceptasm.s
	$(AS) $(LASDEFS) $(LASINCS) -non_shared -G 0 -mips2 -Wa,-32 \
	$(GASFLAGS) -o $@ $(LIBDEPTH)/$(COMPANY)/$(SUBDIR)/exceptasm.s

$(OBJECTS): ./threadasm.h

./threadasm.h: makethreadasm
	./makethreadasm > threadasm.h

makethreadasm: $(LIBDEPTH)/$(COMPANY)/$(SUBDIR)/makethreadasm.c $(PRDEPTH)/include/os.h
	$(HOST_CCF) $(LCINCS) -I$(ROOT)/usr/include -o $@ $(LIBDEPTH)/$(COMPANY)/$(SUBDIR)/makethreadasm.c

include $(LIBDEPTH)/librules

include $(PRDEPTH)/PRrules

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)