Skip to content

Instantly share code, notes, and snippets.

@MarcosX
Last active July 15, 2023 22:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MarcosX/4751372 to your computer and use it in GitHub Desktop.
Save MarcosX/4751372 to your computer and use it in GitHub Desktop.
Simple SDL makefile
# Directories
S_DIR=source
B_DIR=build
# Files
S_FILES=$(S_DIR)/sdl_test.cpp
# Output
EXEC=$(B_DIR)/sdl_app
# Build settings
CC=g++
# SDL options
CC_SDL=-lSDL `sdl-config --cflags --libs`
all:Build
Build:
$(CC) $(S_FILES) -o $(EXEC) $(CC_SDL)
build_run:Build
$(EXEC)
clean:
rm -rf $(B_DIR)/*
@0x61nas
Copy link

0x61nas commented Dec 6, 2022

Thanks yoo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment