how to write a simple makefile for c

后端 未结 3 1475
無奈伤痛
無奈伤痛 2021-01-07 03:43

I need to write a simple make file for my.c, and so after

make

then my program can be run by

./my
3条回答
  •  时光取名叫无心
    2021-01-07 04:02

    simple make file for your program is

    build : 
            gcc /your_full_path_to_c_file/cJ.c my.c -lcrypto -o my -lm
    

    just copy this in one file keep name of that file as makefile then run as make build

提交回复
热议问题