diff options
-rw-r--r-- | make.c | 8 | ||||
-rw-r--r-- | vendor/librune/make.c | 11 |
2 files changed, 8 insertions, 11 deletions
@@ -17,10 +17,8 @@ #include "cbs.h" #include "src/compat.h" -#define CC "cc" -#define CFLAGS \ - "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-pipe", \ - "-Ivendor/librune/include" +#define CC "cc" +#define CFLAGS "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-pipe" #define CFLAGS_DEBUG "-DGRAB_DEBUG", "-g", "-ggdb3" #ifdef __APPLE__ # define CFLAGS_RELEASE "-O3" @@ -118,7 +116,7 @@ main(int argc, char **argv) #ifdef __GLIBC__ cmdadd(&c, "-D_POSIX_C_SOURCE=200809L"); #endif - cmdadd(&c, buf); + cmdadd(&c, "-Ivendor/librune/include", buf); if (!Pflag) { struct strv pc = {0}; cmdadd(&c, "-DGRAB_DO_PCRE=1"); diff --git a/vendor/librune/make.c b/vendor/librune/make.c index 6248f3b..c8a2d4d 100644 --- a/vendor/librune/make.c +++ b/vendor/librune/make.c @@ -10,13 +10,11 @@ #define CC "cc" #ifdef __APPLE__ -# define CFLAGS \ - "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-pipe", "-Iinclude", \ - "-fPIC", "-O3" +# define CFLAGS "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-pipe", "-O3" #else # define CFLAGS \ - "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-pipe", "-Iinclude", \ - "-fPIC", "-O3", "-march=native", "-mtune=native" + "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-pipe", "-O3", \ + "-march=native", "-mtune=native" #endif #define cmdprc(c) \ @@ -85,8 +83,9 @@ work(void *p) dst[strlen(dst) - 1] = 'o'; env_or_default(&sv, "CC", CC); + env_or_default(&sv, "CFLAGS", CFLAGS); cmdaddv(&c, sv.buf, sv.len); - cmdadd(&c, CFLAGS, "-o", dst, "-c", src); + cmdadd(&c, "-Iinclude", "-fPIC", "-o", dst, "-c", src); cmdprc(c); free(dst); |