Make root directory an include path, set #include's properly

Easier to write includes now just using < with the module name, in
comparison to using relative paths.
This commit is contained in:
2023-10-23 04:30:50 +01:00
parent 0ac634a9be
commit 42ac28d44a
5 changed files with 11 additions and 9 deletions

View File

@@ -3,4 +3,7 @@
((nil . ((projectile-project-compilation-cmd . "make")
(projectile-project-configure-cmd . "make clean")
(+license/license-choice . "GPLv2"))))
(+license/license-choice . "GPLv2")))
(c-mode . ((flycheck-gcc-include-path . (".."))
(flycheck-clang-include-path . (".."))
(company-clang-arguments . ("-I..")))))

View File

@@ -1,5 +1,5 @@
CC=gcc
GENERAL-FLAGS=-Wall -Wextra -Werror -Wswitch-enum -std=c11
GENERAL-FLAGS=-Wall -Wextra -Werror -Wswitch-enum -std=c11 -I.
DEBUG-FLAGS=-ggdb -fsanitize=address
RELEASE-FLAGS=-O3
CFLAGS:=$(GENERAL-FLAGS) $(DEBUG-FLAGS)

View File

@@ -15,8 +15,8 @@
#include <stdio.h>
#include <string.h>
#include "../vm/inst.h"
#include "../vm/runtime.h"
#include <vm/inst.h>
#include <vm/runtime.h>
int main(void)
{

View File

@@ -16,8 +16,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "../lib/base.h"
#include "../lib/darr.h"
#include <lib/base.h>
#include <lib/darr.h>
typedef enum
{

View File

@@ -16,7 +16,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "../lib/base.h"
#include "./inst.h"
typedef enum