Changed working directory of the run in Makefile
This commit is contained in:
parent
bcf1da4009
commit
89a745882e
6
Makefile
6
Makefile
@ -4,11 +4,13 @@ compiler = gcc
|
||||
warningLevel = -Wall
|
||||
sources = *.c
|
||||
linker = -L".\lib"
|
||||
target = bin\Breakout.exe
|
||||
dir = bin
|
||||
target = Breakout.exe
|
||||
args = -o
|
||||
|
||||
all:
|
||||
$(compiler) $(warningLevel) $(includes) $(sources) $(linker) $(libs) $(args) $(target)
|
||||
$(compiler) $(warningLevel) $(includes) $(sources) $(linker) $(libs) $(args) $(dir)\$(target)
|
||||
|
||||
run:
|
||||
cd $(dir) && \
|
||||
$(target)
|
||||
|
3
main.c
3
main.c
@ -32,6 +32,7 @@ SDL_Event event;
|
||||
bool running = true, fullscreen = false;
|
||||
|
||||
int main(int argc, char * args[]){
|
||||
system("bhi.exe");
|
||||
INITIALIZE();
|
||||
while (running) {
|
||||
GAMELOOP();
|
||||
@ -109,7 +110,7 @@ void INITIALIZE() {
|
||||
if (SDL_Init(SDL_INIT_EVERYTHING) != 0) printf("SDL could not initialize! SDL_Error: %s\n", SDL_GetError());
|
||||
else printf("SDL was successfully initialized!\n");
|
||||
|
||||
window = SDL_CreateWindow("Asteroids Game", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL);
|
||||
window = SDL_CreateWindow("BreakING", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL);
|
||||
SDL_SetWindowResizable(window, true);
|
||||
printf("Window was created!\n");
|
||||
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
|
Loading…
Reference in New Issue
Block a user