#Buildfile for distributed sort
 
#include ../../buildprefix

SRCS = sort.c sortvars.c qsort.c expandargs.c readdir.c descriptorname.c
OBJS = sort.b sortvars.b qsort.b expandargs.b readdir.b descriptorname.b
  
HEADERS = sort.h sh.h

#ifdef X
OPTS = -O -V -vx 
INCLUDES = -I../../libc/include 
#else X
OPTS = -O -V 
INCLUDES = -I../../libc/include 
#endif X

LIBRARIES =  

.SUFFIXES: .b .ls .s .c
# normal compile of a module
.c.b:
	cc68 $(OPTS) $(INCLUDES) -c $*.c 

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

# how to make an assembly listing
.c.ls:
	cc68 $(OPTS) $(INCLUDES) -c -L $*.c


sort:	$(OBJS)	$(HEADERS)
	cc68 $(OPTS) -r -o sort $(OBJS)

 
install:	sort
#ifdef X
	netinstall -x -p sort /usr/sun/xVboot
#else X
	netinstall -p sort /usr/sun/Vboot
#endif X


clean:
	rm -f *.BAK *.CKP .emacs_* $(OBJS) sort
 
tags: 	$(HEADERS) $(SRCS) 
		ctags -tw $(HEADERS) $(SRCS) 

