# This is a buildtemplate for all buildfiles under /xV/libc/*/vax
#
# Written by Omur Tasar and Jay Schuster
#
# How to generate vax object files.

MACHINE = vax
OBJSUFFIX = o

#ifndef VPATH
VPATH = ../mi
#endif

# must be before buildmachtemplate
LINT = lintvax

.SUFFIXES:
.SUFFIXES: .$(OBJSUFFIX) .s .c

MI = ../mi

#include ../../buildprefix
#include ../buildmachtemplate

#ifdef X
CFLAGS = -O -DxV -vxV
#else X
CFLAGS = -O -vV
#endif X


RULE = ccVAX $(CFLAGS) $(INCLUDES)


# how to make a .o file from a .s file for machine dependent files
.s.o:
	ccVAX $(CFLAGS) -I../../include/vax -E $*.s | $(AS) -o $*.o
	-ld -x -r $*.o
	chmod 664 a.out
	mv a.out $*.o

# how to make a .o file from a .c file for machine dependent files
.c.o:
	ccVAX $(CFLAGS) $(INCLUDES) -c $*.c

