cs205-lecture-examples

Example codes used during Harvard CS205 lectures
git clone https://git.0xfab.ch/cs205-lecture-examples.git
Log | Files | Refs | README | LICENSE

Makefile (286B)


      1 CC = gcc
      2 .PHONY: all clean
      3 
      4 all: hello hello.o hello.i hello.s dump
      5 
      6 hello: hello.c
      7 	$(CC) -o $@ $<
      8 
      9 hello.o: hello.c
     10 	$(CC) -c -o $@ $<
     11 
     12 hello.i: hello.c
     13 	$(CC) -E -o $@ $<
     14 
     15 hello.s: hello.c
     16 	$(CC) -S -o $@ $<
     17 
     18 dump: hello.o
     19 	objdump -d $<
     20 
     21 clean:
     22 	rm -f hello hello.o hello.i hello.s