#
#    Make file for Local
#
#   It assumes that DATA_USE points to Device/Directory holding the
#   Source, and PROG_USE points to directory containing programs
#   making up the compilation system.
#

CC = cc
CFLAGS = -O -V -warn=5 -maxerr=5
LIBS=  -lmin -lcsm

LDFLAGS= -L${P}lib_
LD  = ld
RM  = rm

QMAC  = win1_asm_tools_gst_qmac

QMACCMD   = -nolist -nosym -link -filetype 2 -bin


objs =  local_o exec_o qpipe_o

local_exe: ${objs}
    ${CC} ${CFLAGS} ${DEFINES} ${LDFLAGS} -olocal_exe ${objs} ${LIBS}

clean:
        @${RM} -v -f *_o *_i *_map a_out

clobber:    clean
        @${RM} -v -f ${PROGS}

#   Default rule for those modules that need compiling to _o files

_c_o:
    ${CC} -c ${CFLAGS} ${DEFINES} $<

_s_o:
    ${CC} -c ${CFLAGS} ${DEFINES} $<

_asm_o:
    ${QMAC} $C$*_asm ${QMACCMD} $C$*_o
