Skip to content

Instantly share code, notes, and snippets.

@Ilgrim
Forked from MarcosX/makefile
Created May 5, 2023 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ilgrim/d0ce5289b2dac6bcbc5c3ab78e02c8a9 to your computer and use it in GitHub Desktop.
Save Ilgrim/d0ce5289b2dac6bcbc5c3ab78e02c8a9 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)/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment