raysan5 / raylib-game-template

A small template to start your raylib game
zlib License
420 stars 101 forks source link

Suggestion: Move makefile and resources outside of the src folder #2

Closed jalexcole closed 2 years ago

jalexcole commented 3 years ago

This is more of making this a bit easier to work with and that is having the makefile at the top level of the project folder. Also would like to see the resource folder at the top level to not clutter up the src folder.

jalexcole commented 3 years ago

Also it would be nice to have the .o files go somewhere else instead of the src folder.

raysan5 commented 3 years ago

@jalexcole this templates works ok for me in the current build directories configuration. I know it's not the most professional one but it's simple to work with. Maybe I review it on the future.

anatagawa commented 3 years ago

i think you can change some things like this

# Define all source files required
PROJECT_SOURCE_FILES ?= \
    raylib_game.c \
    screen_logo.c \
    screen_title.c \
    screen_options.c \
    screen_gameplay.c \
    screen_ending.c

by

SRC = src/
PROJECT_SOURCE_FILES ?= $(wildcard $(SRC)*.c $(SRC)**/*.c)

SRC is your source folder of all C files

and put your makefile at root project folder