How to compile different c files with different CFLAGS using Makefile?

前端 未结 3 1152
无人及你
无人及你 2020-12-23 09:54

all. Let\'s say I have a program that contains a long list of C source files, A.c, B.c, ...., Z.c, now I want to compile A.c, B.c with certain CFLAGS, and compile the rest p

3条回答
  •  一整个雨季
    2020-12-23 10:28

    I can't answer the question for raw makefiles, but if you are willing to use automake it is trivial:

    foo_CFLAGS = [options passed to CC only when building foo]
    

提交回复
热议问题