clean up; gl test compiles under freebsd (but see makefile)

This commit is contained in:
aap 2015-06-10 22:52:59 +02:00
parent c6c37da209
commit c0d9ecdf3f
10 changed files with 25 additions and 12 deletions

View File

@ -2,6 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>

View File

@ -2,6 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>

View File

@ -2,6 +2,8 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>
#include "rwbase.h" #include "rwbase.h"

View File

@ -2,6 +2,8 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>
#include "rwbase.h" #include "rwbase.h"

View File

@ -2,6 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>

View File

@ -2,6 +2,8 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>
#include "rwbase.h" #include "rwbase.h"

View File

@ -2,6 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>

View File

@ -2,6 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#include <stdint.h>
#include <new> #include <new>

View File

@ -1,22 +1,21 @@
namespace rw { namespace rw {
typedef char int8; /* get rid of the stupid _t */
typedef short int16; typedef int8_t int8;
typedef int int32; typedef int16_t int16;
typedef long long int64; typedef int32_t int32;
typedef unsigned char uint8; typedef int64_t int64;
typedef unsigned short uint16; typedef uint8_t uint8;
typedef unsigned int uint32; typedef uint16_t uint16;
typedef unsigned long long uint64; typedef uint32_t uint32;
typedef uint64_t uint64;
typedef uintptr_t uintptr;
typedef float float32; typedef float float32;
typedef int32 bool32; typedef int32 bool32;
typedef uint8 byte; typedef uint8 byte;
typedef uint32 uint; typedef uint32 uint;
#if __WORDSIZE == 64
typedef uint64 uintptr; typedef uint64 uintptr;
#else
typedef uint32 uintptr;
#endif
class Stream class Stream
{ {

View File

@ -3,10 +3,13 @@ SRC = main.cpp glshader.cpp math.cpp camera.cpp
OBJ = $(patsubst %.cpp, $(BUILDDIR)/%.o, $(SRC)) OBJ = $(patsubst %.cpp, $(BUILDDIR)/%.o, $(SRC))
DEP = $(patsubst %.cpp, $(BUILDDIR)/%.d, $(SRC)) DEP = $(patsubst %.cpp, $(BUILDDIR)/%.d, $(SRC))
RWDIR=$(HOME)/src/librw RWDIR=$(HOME)/src/librw
#LDLIBS=-pthread -lX11 -lXrandr -lXi -lXxf86vm -lGL -lGLEW -lm #LDLIBS=-pthread -lX11 -lXrandr -lXi -lXxf86vm -lGL -lGLEW -lm
#STATICLIBS= $(RWDIR)/librw-opengl.a /usr/local/lib/libglfw3.a #STATICLIBS= $(RWDIR)/librw-opengl.a /usr/local/lib/libglfw3.a
LDLIBS=-pthread -lGL -lGLEW -lglfw LDLIBS=-pthread -lGL -lGLEW -lglfw
STATICLIBS=$(RWDIR)/librw-opengl.a STATICLIBS=$(RWDIR)/librw-opengl.a
CFLAGS=-g -I$(RWDIR) -Wall -Wextra CFLAGS=-g -I$(RWDIR) -Wall -Wextra
rwtest: $(OBJ) $(STATICLIBS) rwtest: $(OBJ) $(STATICLIBS)