breakout

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 6527f56ebd7adfbab0ce25c11d7b4676bc79f983
parent 62aeaf2166e6d030f0e87728e8b579d722b1af61
Author: Christopher Ray Langford <chris@hellocld.com>
Date:   Sun, 25 Aug 2019 16:55:55 -0400

Makefile links against sdl2 correctly, test build working

Diffstat:
MMakefile | 5+++--
Asrc/main.c | 16++++++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,7 +1,8 @@ CC = gcc -CFLAGS = -g -Wall -pedantic +CFLAGS = -g -Wall -pedantic `sdl2-config --cflags --libs` -defaults: dirs +default: dirs ./src/main.c + $(CC) $(CFLAGS) ./src/main.c -o ./bin/breakout dirs: diff --git a/src/main.c b/src/main.c @@ -0,0 +1,16 @@ +#include "SDL.h" + +int main(int argc, char *argv[]) +{ + if(SDL_Init(SDL_INIT_EVERYTHING) < 0) { + SDL_Log("Failed to initialize SDL: %s\n", SDL_GetError()); + return 1; + } + + SDL_Log("SDL initialized successfully\n"); + SDL_Delay(1000); + + SDL_Quit(); + + return 0; +}