Move device to a separate build target
This commit is contained in:
parent
4866226840
commit
56eaee9d08
6
device/BUILD
Normal file
6
device/BUILD
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "device",
|
||||||
|
srcs = glob(["*.c"]),
|
||||||
|
hdrs = glob(["*.h"]),
|
||||||
|
visibility = ["//visibility:public"]
|
||||||
|
)
|
@ -2,5 +2,6 @@ cc_library(
|
|||||||
name = "game",
|
name = "game",
|
||||||
srcs = glob(["*.c"]),
|
srcs = glob(["*.c"]),
|
||||||
hdrs = glob(["*.h"]),
|
hdrs = glob(["*.h"]),
|
||||||
visibility = ["//sdl_host:__pkg__"]
|
visibility = ["//visibility:public"],
|
||||||
|
deps = ["//device:device"]
|
||||||
)
|
)
|
@ -1,4 +1,4 @@
|
|||||||
#include "device.h"
|
#include "device/device.h"
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
|
||||||
uint32_t game_frame;
|
uint32_t game_frame;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
cc_binary(
|
cc_binary(
|
||||||
name = "sdl_host",
|
name = "sdl_host",
|
||||||
srcs = glob(["*.c", "*.h"]),
|
srcs = glob(["*.c", "*.h"]),
|
||||||
deps = ["//game:game", "//sdl:sdl"],
|
deps = ["//device:device", "//game:game", "//sdl:sdl"],
|
||||||
)
|
)
|
@ -4,8 +4,8 @@
|
|||||||
// don't use sdl's redefinition of main
|
// don't use sdl's redefinition of main
|
||||||
#define SDL_MAIN_HANDLED
|
#define SDL_MAIN_HANDLED
|
||||||
#include "sdl/include/SDL.h"
|
#include "sdl/include/SDL.h"
|
||||||
|
#include "device/device.h"
|
||||||
#include "game/game.h"
|
#include "game/game.h"
|
||||||
#include "game/device.h"
|
|
||||||
|
|
||||||
void sdl_host_suggest_dimensions(uint32_t* window_w, uint32_t* window_h);
|
void sdl_host_suggest_dimensions(uint32_t* window_w, uint32_t* window_h);
|
||||||
void sdl_host_loop();
|
void sdl_host_loop();
|
||||||
|
Loading…
Reference in New Issue
Block a user