Makefile 7.8 KB
#!smake -k
# --------------------------------------------------------------------
#        Copyright (C) 1997 Nintendo. (Originated by SGI)
#        
#        $RCSfile: Makefile,v $
#        $Revision: 1.1.1.1 $
#        $Date: 2002/05/02 03:27:09 $
# --------------------------------------------------------------------
#
# Makefile for fire demo application 
#
#
#

include $(ROOT)/usr/include/make/PRdefs

APP =		teapot

OPTIMIZER =	-g

TARGETS =	rom

TEXHFILES =	tv2_00.h tv2_01.h tv2_02.h tv2_03.h tv2_04.h \
		tv2_05.h tv2_06.h tv2_07.h tv2_08.h tv2_09.h \
		tv2_10.h tv2_11.h tv2_12.h tv2_13.h tv2_14.h \
		tv2_15.h tv2_16.h tv2_17.h tv2_18.h tv2_19.h \
		tv2_20.h tv2_21.h tv2_22.h tv2_23.h tv2_24.h \
		tv2_25.h tv2_26.h tv2_27.h tv2_28.h tv2_29.h \
		tv2_30.h tv2_31.h tv2_32.h tv2_33.h tv2_34.h \
		tv2_35.h tv2_36.h tv2_37.h tv2_38.h tv2_39.h \
		tv2_40.h tv2_41.h tv2_42.h tv2_43.h tv2_44.h \
		tv2_45.h tv2_46.h tv2_47.h tv2_48.h tv2_49.h \
		tv2_50.h tv2_51.h tv2_52.h tv2_53.h tv2_54.h \
		tv2_55.h tv2_56.h tv2_57.h tv2_58.h tv2_59.h

HFILES =	I4spec.h controller.h teapot_tri.h \
		IA8phong.h teapot.h teapot_vtx.h


CODEFILES   =	teapot.c controller.c

CODEOBJECTS =	$(CODEFILES:.c=.o)

DATAFILES   =	static.c	\
		static_aug.c	\
		zbuffer.c	\
		cfb.c

DATAOBJECTS =   $(DATAFILES:.c=.o)

CODESEGMENT =	codesegment.o

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

LCDEFS =	-DUSE_HIGHLIGHT
LCINCS =	-I. -I$(ROOT)/usr/include/PR -I $(ROOT)/usr/include
LCOPTS =	-fullwarn -non_shared -G 0

LDIRT  =	$(APP) teapot $(TEXHFILES) *.so

#
# Use non debug library just so we have some demos using it to test it
#
LDFLAGS =	$(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR -lultra

default:	$(TARGETS)

include $(COMMONRULES)

install:        default
		$(INSTALL) -m 444 -F /usr/src/PR/demos/fire \
			$(HFILES) $(CODEFILES) $(DATAFILES) Makefile spec \
			Texture/tv2_0 Texture/tv2_1 Texture/tv2_2 Texture/tv2_3 \
			Texture/tv2_4 Texture/tv2_5 Texture/tv2_6 Texture/tv2_7 \
			Texture/tv2_8 Texture/tv2_9 Texture/tv2_10 Texture/tv2_11 \
			Texture/tv2_12 Texture/tv2_13 Texture/tv2_14 Texture/tv2_15 \
			Texture/tv2_16 Texture/tv2_17 Texture/tv2_18 Texture/tv2_19 \
			Texture/tv2_20 Texture/tv2_21 Texture/tv2_22 Texture/tv2_23 \
			Texture/tv2_24 Texture/tv2_25 Texture/tv2_26 Texture/tv2_27 \
			Texture/tv2_28 Texture/tv2_29 Texture/tv2_30 Texture/tv2_31 \
			Texture/tv2_32 Texture/tv2_33 Texture/tv2_34 Texture/tv2_35 \
			Texture/tv2_36 Texture/tv2_37 Texture/tv2_38 Texture/tv2_39 \
			Texture/tv2_40 Texture/tv2_41 Texture/tv2_42 Texture/tv2_43 \
			Texture/tv2_44 Texture/tv2_45 Texture/tv2_46 Texture/tv2_47 \
			Texture/tv2_48 Texture/tv2_49 Texture/tv2_50 Texture/tv2_51 \
			Texture/tv2_52 Texture/tv2_53 Texture/tv2_54 Texture/tv2_55 \
			Texture/tv2_56 Texture/tv2_57 Texture/tv2_58 Texture/tv2_59

$(CODESEGMENT):	$(CODEOBJECTS)
		$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)

#
# This must depend on the generated h-files.
# If we don't do this, smake fails.
#
teapot.o: $(TEXHFILES)

$(OBJECTS): $(HFILES) $(TEXHFILES)

rom $(APP):	spec $(OBJECTS) $(MAKEROM)
		$(MAKEROM) -r rom spec

teapot.o: teapot.c
	$(CC) $(CFLAGS) -c $< 

#
# Header file build rules
#

tv2_00.h: Texture/tv2_0
	$(RGB2C) -m tv2_00 -f RGBA Texture/tv2_0 > tv2_00.h

tv2_01.h: Texture/tv2_1
	$(RGB2C) -m tv2_01 -f RGBA Texture/tv2_1 > tv2_01.h

tv2_02.h: Texture/tv2_2
	$(RGB2C) -m tv2_02 -f RGBA Texture/tv2_2 > tv2_02.h

tv2_03.h: Texture/tv2_3
	$(RGB2C) -m tv2_03 -f RGBA Texture/tv2_3 > tv2_03.h

tv2_04.h: Texture/tv2_4
	$(RGB2C) -m tv2_04 -f RGBA Texture/tv2_4 > tv2_04.h

tv2_05.h: Texture/tv2_5
	$(RGB2C) -m tv2_05 -f RGBA Texture/tv2_5 > tv2_05.h

tv2_06.h: Texture/tv2_6
	$(RGB2C) -m tv2_06 -f RGBA Texture/tv2_6 > tv2_06.h

tv2_07.h: Texture/tv2_7
	$(RGB2C) -m tv2_07 -f RGBA Texture/tv2_7 > tv2_07.h

tv2_08.h: Texture/tv2_8
	$(RGB2C) -m tv2_08 -f RGBA Texture/tv2_8 > tv2_08.h

tv2_09.h: Texture/tv2_9
	$(RGB2C) -m tv2_09 -f RGBA Texture/tv2_9 > tv2_09.h

tv2_10.h: Texture/tv2_10
	$(RGB2C) -m tv2_10 -f RGBA Texture/tv2_10 > tv2_10.h

tv2_11.h: Texture/tv2_11
	$(RGB2C) -m tv2_11 -f RGBA Texture/tv2_11 > tv2_11.h

tv2_12.h: Texture/tv2_12
	$(RGB2C) -m tv2_12 -f RGBA Texture/tv2_12 > tv2_12.h

tv2_13.h: Texture/tv2_13
	$(RGB2C) -m tv2_13 -f RGBA Texture/tv2_13 > tv2_13.h

tv2_14.h: Texture/tv2_14
	$(RGB2C) -m tv2_14 -f RGBA Texture/tv2_14 > tv2_14.h

tv2_15.h: Texture/tv2_15
	$(RGB2C) -m tv2_15 -f RGBA Texture/tv2_15 > tv2_15.h

tv2_16.h: Texture/tv2_16
	$(RGB2C) -m tv2_16 -f RGBA Texture/tv2_16 > tv2_16.h

tv2_17.h: Texture/tv2_17
	$(RGB2C) -m tv2_17 -f RGBA Texture/tv2_17 > tv2_17.h

tv2_18.h: Texture/tv2_18
	$(RGB2C) -m tv2_18 -f RGBA Texture/tv2_18 > tv2_18.h

tv2_19.h: Texture/tv2_19
	$(RGB2C) -m tv2_19 -f RGBA Texture/tv2_19 > tv2_19.h

tv2_20.h: Texture/tv2_20
	$(RGB2C) -m tv2_20 -f RGBA Texture/tv2_20 > tv2_20.h

tv2_21.h: Texture/tv2_21
	$(RGB2C) -m tv2_21 -f RGBA Texture/tv2_21 > tv2_21.h

tv2_22.h: Texture/tv2_22
	$(RGB2C) -m tv2_22 -f RGBA Texture/tv2_22 > tv2_22.h

tv2_23.h: Texture/tv2_23
	$(RGB2C) -m tv2_23 -f RGBA Texture/tv2_23 > tv2_23.h

tv2_24.h: Texture/tv2_24
	$(RGB2C) -m tv2_24 -f RGBA Texture/tv2_24 > tv2_24.h

tv2_25.h: Texture/tv2_25
	$(RGB2C) -m tv2_25 -f RGBA Texture/tv2_25 > tv2_25.h

tv2_26.h: Texture/tv2_26
	$(RGB2C) -m tv2_26 -f RGBA Texture/tv2_26 > tv2_26.h

tv2_27.h: Texture/tv2_27
	$(RGB2C) -m tv2_27 -f RGBA Texture/tv2_27 > tv2_27.h

tv2_28.h: Texture/tv2_28
	$(RGB2C) -m tv2_28 -f RGBA Texture/tv2_28 > tv2_28.h

tv2_29.h: Texture/tv2_29
	$(RGB2C) -m tv2_29 -f RGBA Texture/tv2_29 > tv2_29.h

tv2_30.h: Texture/tv2_30
	$(RGB2C) -m tv2_30 -f RGBA Texture/tv2_30 > tv2_30.h

tv2_31.h: Texture/tv2_31
	$(RGB2C) -m tv2_31 -f RGBA Texture/tv2_31 > tv2_31.h

tv2_32.h: Texture/tv2_32
	$(RGB2C) -m tv2_32 -f RGBA Texture/tv2_32 > tv2_32.h

tv2_33.h: Texture/tv2_33
	$(RGB2C) -m tv2_33 -f RGBA Texture/tv2_33 > tv2_33.h

tv2_34.h: Texture/tv2_34
	$(RGB2C) -m tv2_34 -f RGBA Texture/tv2_34 > tv2_34.h

tv2_35.h: Texture/tv2_35
	$(RGB2C) -m tv2_35 -f RGBA Texture/tv2_35 > tv2_35.h

tv2_36.h: Texture/tv2_36
	$(RGB2C) -m tv2_36 -f RGBA Texture/tv2_36 > tv2_36.h

tv2_37.h: Texture/tv2_37
	$(RGB2C) -m tv2_37 -f RGBA Texture/tv2_37 > tv2_37.h

tv2_38.h: Texture/tv2_38
	$(RGB2C) -m tv2_38 -f RGBA Texture/tv2_38 > tv2_38.h

tv2_39.h: Texture/tv2_39
	$(RGB2C) -m tv2_39 -f RGBA Texture/tv2_39 > tv2_39.h

tv2_40.h: Texture/tv2_40
	$(RGB2C) -m tv2_40 -f RGBA Texture/tv2_40 > tv2_40.h

tv2_41.h: Texture/tv2_41
	$(RGB2C) -m tv2_41 -f RGBA Texture/tv2_41 > tv2_41.h

tv2_42.h: Texture/tv2_42
	$(RGB2C) -m tv2_42 -f RGBA Texture/tv2_42 > tv2_42.h

tv2_43.h: Texture/tv2_43
	$(RGB2C) -m tv2_43 -f RGBA Texture/tv2_43 > tv2_43.h

tv2_44.h: Texture/tv2_44
	$(RGB2C) -m tv2_44 -f RGBA Texture/tv2_44 > tv2_44.h

tv2_45.h: Texture/tv2_45
	$(RGB2C) -m tv2_45 -f RGBA Texture/tv2_45 > tv2_45.h

tv2_46.h: Texture/tv2_46
	$(RGB2C) -m tv2_46 -f RGBA Texture/tv2_46 > tv2_46.h

tv2_47.h: Texture/tv2_47
	$(RGB2C) -m tv2_47 -f RGBA Texture/tv2_47 > tv2_47.h

tv2_48.h: Texture/tv2_48
	$(RGB2C) -m tv2_48 -f RGBA Texture/tv2_48 > tv2_48.h

tv2_49.h: Texture/tv2_49
	$(RGB2C) -m tv2_49 -f RGBA Texture/tv2_49 > tv2_49.h

tv2_50.h: Texture/tv2_50
	$(RGB2C) -m tv2_50 -f RGBA Texture/tv2_50 > tv2_50.h

tv2_51.h: Texture/tv2_51
	$(RGB2C) -m tv2_51 -f RGBA Texture/tv2_51 > tv2_51.h

tv2_52.h: Texture/tv2_52
	$(RGB2C) -m tv2_52 -f RGBA Texture/tv2_52 > tv2_52.h

tv2_53.h: Texture/tv2_53
	$(RGB2C) -m tv2_53 -f RGBA Texture/tv2_53 > tv2_53.h

tv2_54.h: Texture/tv2_54
	$(RGB2C) -m tv2_54 -f RGBA Texture/tv2_54 > tv2_54.h

tv2_55.h: Texture/tv2_55
	$(RGB2C) -m tv2_55 -f RGBA Texture/tv2_55 > tv2_55.h

tv2_56.h: Texture/tv2_56
	$(RGB2C) -m tv2_56 -f RGBA Texture/tv2_56 > tv2_56.h

tv2_57.h: Texture/tv2_57
	$(RGB2C) -m tv2_57 -f RGBA Texture/tv2_57 > tv2_57.h

tv2_58.h: Texture/tv2_58
	$(RGB2C) -m tv2_58 -f RGBA Texture/tv2_58 > tv2_58.h

tv2_59.h: Texture/tv2_59
	$(RGB2C) -m tv2_59 -f RGBA Texture/tv2_59 > tv2_59.h