#testsrc := test.s sub1.s sub2.s #test := test.out sortsrc := sort.s main.s read_record.s # etc. sort := sort.out sort.o: sort.s sort.inc as --gstabs -o $@ $$ main.o: main.s sort.inc as --gstabs -o $@ $$ read_record.o: read_record.s sort.inc as --gstabs -o $@ $$ $(sort): $(sortsrc:.s=.o) ld -o $@ $^ testSwapsrc := testSwap.s swap.s testSwap := testSwap.out project2src := project2.s project2 := project2.out revSrc := rev.s revmain.s rev := revmain.out swapSrc := 20050405_main.s 20050405_swap.s swap := swap.out test_readcharSrc = test_readchar.s readchar.s test_readchar = test_readchar.out test_isspaceSrc = test_isspace.s isspace.s readchar.s test_isspace = test_isspace.out test_writecharSrc = test_writechar.s writechar.s readchar.s isspace.s test_writechar = test_writechar.out test_printdecSrc = test_printdec.s writechar.s readchar.s isspace.s my/printdec.s test_printdec = test_printdec.out wcSrc = wc.s writechar.s readchar.s isspace.s my/printdec.s my/readword.s wc = wc.out $(test): $(testsrc:.s=.o) ld -o $@ $^ $(project2): $(project2src:.s=.o) ld -o $@ $^ $(testSwap): $(testSwapsrc:.s=.o) ld -o $@ $^ $(test_readchar): $(test_readcharSrc:.s=.o) ld -o $@ $^ $(test_isspace): $(test_isspaceSrc:.s=.o) ld -o $@ $^ $(test_writechar): $(test_writecharSrc:.s=.o) ld -o $@ $^ $(test_printdec): $(test_printdecSrc:.s=.o) ld -o $@ $^ $(wc): $(wcSrc:.s=.o) ld -o $@ $^ $(rev): $(revSrc:.s=.o) ld -o $@ $^ $(swap): $(swapSrc:.s=.o) ld -o $@ $^ %.o: %.s as --gstabs -o $@ $? %.out: %.o ld -o $@ $? %.gdb: %.out gdb $?