cs icon indicating copy to clipboard operation
cs copied to clipboard

Procedures of learning Computer Science

Preface

任何问题都可以发在 Issues 里面 :)

How to make

  • first write a hello.c, then

    $ make hello
    $ ./hello
    

    to debug and test

  • Makefile basic format

    edit : main.o abc.o
    	cc -o edit main.o abc.o
    
    main.o : main.c def.h
    	cc -c main.c
    abc.o : abc.c def.h
    	cc -c abc.c
    
    clean :
    	rm main.o abc.o
    .PHONY : edit clean
    

    then

    $ make
    $ make clean