Compiling works for Brainstorm
This commit is contained in:
parent
34d0565886
commit
2c88a01cfd
16
Makefile
16
Makefile
|
@ -9,7 +9,7 @@ endif
|
|||
UNAME_P := $(shell uname -m)
|
||||
|
||||
#CC specifies which compiler we're using
|
||||
CC = clang -x c --std=c99
|
||||
CC = clang
|
||||
CXX = clang++
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
@ -23,12 +23,13 @@ BUILDDIR := ./obj
|
|||
objprefix = ./obj
|
||||
|
||||
DIRS := engine pinball editor brainstorm
|
||||
ETP := ./source/engine/thirdparty/
|
||||
|
||||
# All other sources
|
||||
esrcs := $(shell find ./source/engine -name '*.c*')
|
||||
esrcs := $(filter-out %sqlite3.c %shell.c %s7.c, $(esrcs))
|
||||
esrcs := $(filter-out %sqlite3.c %shell.c, $(esrcs))
|
||||
eheaders := $(shell find ./source/engine -name '*.h')
|
||||
edirs := $(shell find ./source/engine -type d)
|
||||
edirs := $(addprefix $(ETP), Chipmunk2D/include bitmap-outliner cgltf enet/include pl_mpeg s7 sqlite3 stb) ./source/engine # $(shell find ./source/engine -type d)
|
||||
edirs := $(filter-out %docs %doc %include% %src %examples , $(edirs))
|
||||
|
||||
eobjects := $(sort $(patsubst .%.cpp, $(objprefix)%.o, $(filter %.cpp, $(esrcs))) $(patsubst .%.c, $(objprefix)%.o, $(filter %.c, $(esrcs))))
|
||||
|
@ -90,17 +91,18 @@ yuginec := ./source/engine/yugine.c
|
|||
|
||||
.SECONARY: $(eobjects)
|
||||
|
||||
engine: engine.a
|
||||
engine: libengine.a
|
||||
@echo Linking engine
|
||||
$(CXX) $(yuginec) -DGLEW_STATIC $(includeflag) $(LIBPATH) $(LINKER_FLAGS) $(LELIBS) -o yugine
|
||||
|
||||
engine.a: $(eobjects)
|
||||
libengine.a: $(eobjects)
|
||||
@echo Making library engine.a
|
||||
@ar -rv libengine.a $(eobjects)
|
||||
@ar -r libengine.a $(eobjects)
|
||||
|
||||
brainstorms: engine.a $(bsobjects)
|
||||
xbrainstorm: libengine.a $(bsobjects)
|
||||
@echo Making brainstorm
|
||||
$(CXX) $(bsobjects) -DGLEW_STATIC $(includeflag) $(LIBPATH) $(LINKER_FLAGS) $(LELIBS) -o $@
|
||||
mv xbrainstorm brainstorm/xbrainstorm
|
||||
|
||||
$(objprefix)/%.o:%.cpp
|
||||
@mkdir -p $(@D)
|
||||
|
|
|
@ -18,7 +18,7 @@ extern "C" {
|
|||
#include "level.h"
|
||||
#include "texture.h"
|
||||
#include "sprite.h"
|
||||
#include <chipmunk.h>
|
||||
#include <chipmunk/chipmunk.h>
|
||||
#include "math.h"
|
||||
#include <GL/glew.h>
|
||||
#include <ftw.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef EDITOR_H
|
||||
#define EDITOR_H
|
||||
|
||||
#include "config.h"
|
||||
#include <config.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stdbool.h>
|
||||
#include "resources.h"
|
||||
|
|
|
@ -205,7 +205,7 @@ void phys2d_edgeaddvert(struct phys2d_edge *edge)
|
|||
#include "debugdraw.h"
|
||||
#include "gameobject.h"
|
||||
#include <math.h>
|
||||
#include <chipmunk_unsafe.h>
|
||||
#include <chipmunk/chipmunk_unsafe.h>
|
||||
|
||||
void phys2d_applycircle(struct phys2d_circle *circle)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef TWODPHYSICS_H
|
||||
#define TWODPHYSICS_H
|
||||
|
||||
#include <chipmunk.h>
|
||||
#include <chipmunk/chipmunk.h>
|
||||
|
||||
|
||||
struct mGameObject;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <3dphysics.h>
|
||||
#include "3dphysics.h"
|
||||
|
||||
/*
|
||||
btDefaultCollisionConfiguration *collisionConfig {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "vec.h"
|
||||
#include "input.h"
|
||||
#include <string.h>
|
||||
#include <chipmunk.h>
|
||||
#include <chipmunk/chipmunk.h>
|
||||
|
||||
struct vec *gameobjects = NULL;
|
||||
struct mGameObject *updateGO = NULL;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "transform.h"
|
||||
#include "config.h"
|
||||
#include <stdbool.h>
|
||||
#include <chipmunk.h>
|
||||
#include <chipmunk/chipmunk.h>
|
||||
|
||||
struct mShader;
|
||||
struct mSprite;
|
||||
|
|
|
@ -1 +1 @@
|
|||
#include <gizmo.h>
|
||||
#include "gizmo.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <light.h>
|
||||
#include "light.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
|
|
|
@ -28,9 +28,11 @@ void registry_init()
|
|||
register_component("2D Edge", sizeof(struct phys2d_edge), &Make2DEdge,
|
||||
&phys2d_dbgdrawedge, &edge_gui, &phys2d_edgeinit,
|
||||
NULL);
|
||||
/*
|
||||
register_component("Flipper", sizeof(struct flipper),
|
||||
&pinball_flipper_make, NULL, &pinball_flipper_gui,
|
||||
&pinball_flipper_init, &pinball_flipper_update);
|
||||
*/
|
||||
}
|
||||
|
||||
void register_component(const char *name, size_t size,
|
||||
|
|
Loading…
Reference in a new issue