# Makefile for JOS Binaries # Michael A. Puening Modified by Kim Buckner and Matthew Allen # OS updated to 2.8 Spring 2002 # all ${GTYPE} has been changed to sparc-sun-solaris2.8 XCOMP=/home/cs560/xcomp XCOMP_BIN = ${XCOMP}/sparc-sun-solaris2.8/decstation-ultrix/bin CC = ${XCOMP_BIN}/gcc LD = ${XCOMP_BIN}/ld AR = ${XCOMP_BIN}/ar AS = ${XCOMP_BIN}/as RANLIB = ${XCOMP_BIN}/ranlib C2N = ${XCOMP}/coff2noff/sparc-sun-solaris2.8/coff2noff EXECUTABLES = hw start: all all: ${EXECUTABLES} CFLAGS = -c -I${XCOMP}/include -G0 #ENSURE that the -G0 option is used for linker and the compiler #if it is not used, the linker generates too many sections of assembly #code and then coff2noff fails to convert the file SUPPORT=${XCOMP}/support CRT = ${SUPPORT}/crt0.o ASSIST = ${SUPPORT}/assist.o LIBSYS = ${SUPPORT}/libsys.a LIBC = ${SUPPORT}/libc.a LDFLAGS = -G0 -T ${SUPPORT}/noff.ld -N -L${XCOMP}/sparc-sun-solaris2.8/lib LIBS = -lc -lsys hw: hw.o ${CRT} ${ASSIST} ${LIBSYS} ${LIBC} ${LD} ${LDFLAGS} -o $@.coff ${CRT} ${ASSIST} $@.o ${LIBS} ${C2N} $@.coff $@ /bin/rm $@.coff evil_test: evil_test.o ${CRT} ${ASSIST} ${LIBSYS} ${LIBC} ${LD} ${LDFLAGS} -o $@.coff ${CRT} ${ASSIST} $@.o ${LIBS} ${C2N} $@.coff $@ /bin/rm $@.coff getppid: getppid.o ${CRT} ${ASSIST} ${LIBSYS} ${LIBC} ${LD} ${LDFLAGS} -o $@.coff ${CRT} ${ASSIST} $@.o ${LIBS} ${C2N} $@.coff $@ /bin/rm $@.coff .c.o: ${CC} ${CFLAGS} $*.c clean: /bin/rm -f *.s *.o *.coff $(EXECUTABLES) core a.out