CSC231 Homework 9 Solution 2010

From dftwiki3
Revision as of 12:08, 14 December 2010 by Thiebaut (talk | contribs) (Created page with '--~~~~ ---- =Makefile= <code><pre> CC = gcc LD = gcc NASM = nasm CFLAGS = -c LFLAGS = NASMFLAGS = -f elf -F stabs #PROG = hw5test PROG = hw9 OBJS = asm_io.o $(PROG).o driv…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut 17:08, 14 December 2010 (UTC)


Makefile

CC = gcc
LD = gcc
NASM = nasm 

CFLAGS =  -c
LFLAGS = 
NASMFLAGS = -f elf -F stabs

#PROG = hw5test
PROG = hw9

OBJS = asm_io.o $(PROG).o driver.o


default: $(PROG)

$(PROG): $(OBJS) 
	$(LD) $(LFLAGS) $(OBJS)  -o $(PROG)

asm_io.o: asm_io.asm
	$(NASM) $(NASMFLAGS) asm_io.asm

$(PROG).o: $(PROG).asm asm_io.inc
	$(NASM) $(NASMFLAGS) $(PROG).asm

driver.o: driver.c 
	$(CC) $(CFLAGS) driver.c

clean:
	rm -rf *.o *~

real_clean:
	 rm -rf *.o $(PROG) *~

hw9.asm


This section is only visible to computers located at Smith College