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:
@@ -1,6 +1,9 @@
|
|||||||
;;; Directory Local Variables -*- no-byte-compile: t -*-
|
;;; Directory Local Variables -*- no-byte-compile: t -*-
|
||||||
;;; For more information see (info "(emacs) Directory Variables")
|
;;; For more information see (info "(emacs) Directory Variables")
|
||||||
|
|
||||||
((nil . ((projectile-project-compilation-cmd . "make")
|
((nil . ((projectile-project-compilation-cmd . "make")
|
||||||
(projectile-project-configure-cmd . "make clean")
|
(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
|
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
|
DEBUG-FLAGS=-ggdb -fsanitize=address
|
||||||
RELEASE-FLAGS=-O3
|
RELEASE-FLAGS=-O3
|
||||||
CFLAGS:=$(GENERAL-FLAGS) $(DEBUG-FLAGS)
|
CFLAGS:=$(GENERAL-FLAGS) $(DEBUG-FLAGS)
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../vm/inst.h"
|
#include <vm/inst.h>
|
||||||
#include "../vm/runtime.h"
|
#include <vm/runtime.h>
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "../lib/base.h"
|
#include <lib/base.h>
|
||||||
#include "../lib/darr.h"
|
#include <lib/darr.h>
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "../lib/base.h"
|
|
||||||
#include "./inst.h"
|
#include "./inst.h"
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|||||||
Reference in New Issue
Block a user