From 3dfd93e3655e6e59bc7fd6ef99627a545de13e4b Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 8 May 2020 23:03:58 -0700 Subject: [PATCH] lib, programs: include common_defs.h by relative path It's better to use a relative path, so that people not using the Makefile don't have to put -Icommon on their compiler command line. --- Makefile | 2 +- Makefile.msc | 2 +- lib/lib_common.h | 2 +- programs/prog_util.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f2985d7..43f8273 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null \ 1>&2 2>/dev/null; then echo $(1); fi) override CFLAGS := \ - -O2 -fomit-frame-pointer $(CFLAGS) -std=c99 -I. -Icommon \ + -O2 -fomit-frame-pointer $(CFLAGS) -std=c99 -I. \ -Wall -Wundef \ $(call cc-option,-Wpedantic) \ $(call cc-option,-Wdeclaration-after-statement) \ diff --git a/Makefile.msc b/Makefile.msc index 99b73e3..96b34f8 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -10,7 +10,7 @@ CC = cl LD = link AR = lib -CFLAGS = /MD /O2 -I. -Icommon +CFLAGS = /MD /O2 -I. LDFLAGS = STATIC_LIB = libdeflatestatic.lib diff --git a/lib/lib_common.h b/lib/lib_common.h index 93f6845..98e8783 100644 --- a/lib/lib_common.h +++ b/lib/lib_common.h @@ -12,7 +12,7 @@ #define BUILDING_LIBDEFLATE -#include "common_defs.h" +#include "../common/common_defs.h" /* * Prefix with "_libdeflate_" all global symbols which are not part of the API diff --git a/programs/prog_util.h b/programs/prog_util.h index bfab2cf..6bc4599 100644 --- a/programs/prog_util.h +++ b/programs/prog_util.h @@ -39,7 +39,7 @@ #include #include -#include "common_defs.h" +#include "../common/common_defs.h" #ifdef __GNUC__ # define _printf(str_idx, args_idx) \