Browse Source

Merge pull request #5 from scottstensland/master

was failing to compile linux - error: unknown type name ‘uint16_t’
Marco Bambini 8 years ago
parent
commit
18e3e22bed
3 changed files with 5 additions and 1 deletions
  1. 1 1
      Makefile
  2. 2 0
      src/compiler/gravity_token.h
  3. 2 0
      src/shared/gravity_array.h

+ 1 - 1
Makefile

@@ -13,7 +13,7 @@ SRC = $(wildcard $(COMPILER_DIR)*.c) \
 INCLUDE = -I$(COMPILER_DIR) -I$(RUNTIME_DIR) -I$(SHARED_DIR) -I$(UTILS_DIR) 
 INCLUDE = -I$(COMPILER_DIR) -I$(RUNTIME_DIR) -I$(SHARED_DIR) -I$(UTILS_DIR) 
 CFLAGS = $(INCLUDE) -O2
 CFLAGS = $(INCLUDE) -O2
 OBJ = $(SRC:.c=.o)
 OBJ = $(SRC:.c=.o)
-LDFLAGS = 
+LDFLAGS = -lm
 
 
 all: unittest gravity
 all: unittest gravity
 
 

+ 2 - 0
src/compiler/gravity_token.h

@@ -9,6 +9,8 @@
 #ifndef __GRAVITY_TOKEN__
 #ifndef __GRAVITY_TOKEN__
 #define __GRAVITY_TOKEN__
 #define __GRAVITY_TOKEN__
 
 
+#include <stdint.h>
+
 #include "debug_macros.h"
 #include "debug_macros.h"
 
 
 //	================
 //	================

+ 2 - 0
src/shared/gravity_array.h

@@ -9,6 +9,8 @@
 #ifndef __GRAVITY_MUTABLE_ARRAY__
 #ifndef __GRAVITY_MUTABLE_ARRAY__
 #define __GRAVITY_MUTABLE_ARRAY__
 #define __GRAVITY_MUTABLE_ARRAY__
 
 
+#include <stdint.h> 
+
 // Inspired by https://github.com/attractivechaos/klib/blob/master/kvec.h
 // Inspired by https://github.com/attractivechaos/klib/blob/master/kvec.h
 
 
 #define MARRAY_DEFAULT_SIZE			8
 #define MARRAY_DEFAULT_SIZE			8