#Buildtemplate for unix subdirectories

#include ../../buildprefix

OBJSUFFIX = o
MACHINE = unix
CC = cc
UNIX =
LINT = lint

# clear the suffix list to avoid extraneous file lookups
.SUFFIXES:
.SUFFIXES: .o .c .s

#ifndef VPATH
VPATH= ../mi
#endif

# Perhaps we should get rid of SPECINCLUDES and just use INCLUDES?
#ifndef SPECINCLUDES
SPECINCLUDES =
#endif
#ifndef INCLUDES
INCLUDES = -I/usr/include -I$(VSOURCE)/libc/include/mi
#endif

#ifndef LIBRARIES
LIBRARIES = -lm $(VSOURCE)/libc/unix/libVgts.a
# ^ This should probably be:
#         = -lm $(VSYS)/lib/unix/libVgts.a,
# but $(VSYS)/lib/unix doesn't exist right now.
#endif

MIFLAGS = -O -DUNIX
MDFLAGS =

# normal compile of a module
.c.o:
	$(CC) $(MIFLAGS) $(SPECINCLUDES) $(INCLUDES) -c $*.c 

# how to make an assembly file (Not deleting it or assembling it)
.c.s:
	$(CC) $(MIFLAGS) $(SPECINCLUDES) $(INCLUDES) -S $*.c

# how to make an assembly listing
.c.ls:
	$(CC) $(MIFLAGS) $(SPECINCLUDES) $(INCLUDES) -c -L $*.c
