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:
@@ -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..")))))
|
||||
|
||||
2
Makefile
2
Makefile
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../lib/base.h"
|
||||
#include "./inst.h"
|
||||
|
||||
typedef enum
|
||||
|
||||
Reference in New Issue
Block a user