Clean project structure
Moved resources to a new resources directory and moved headers to src/
This commit is contained in:
parent
cca9791e12
commit
7c2a6c8341
6
Makefile
6
Makefile
|
@ -3,12 +3,11 @@ CFLAGS += -Wall -Wextra
|
|||
CFLAGS += -DSDL
|
||||
LIB += -lSDL2 -lSDL2_ttf
|
||||
LDFLAGS = $(LIB)
|
||||
INCLUDES = -Iinclude
|
||||
INCLUDES =
|
||||
|
||||
SRCDIR = src
|
||||
|
||||
SOURCES = $(wildcard src/*.cpp)
|
||||
HEADERS = $(wildcard $(INCDIR)/*.h)
|
||||
OBJECTS = $(patsubst $(SRCDIR)/%,build_sdl/%,$(SOURCES:.cpp=.o))
|
||||
DEPS = $(patsubst $(SRCDIR)/%,build_sdl/%,$(SOURCES:.cpp=.d))
|
||||
|
||||
|
@ -39,7 +38,8 @@ build_sdl/%.o: $(SRCDIR)/%.cpp
|
|||
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ -MMD $< -MF "build_sdl/$(patsubst $(SRCDIR)/%,%,$(<:.cpp=.d))"
|
||||
|
||||
clean:
|
||||
rm $(TARGET) build_sdl/*
|
||||
rm $(TARGET)
|
||||
rm build_sdl -r
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ TARGET := $(notdir $(CURDIR))
|
|||
BUILD := build
|
||||
SOURCES := src
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
INCLUDES :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code and add-in generation
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
MKG3AFLAGS := -n basic:racing -i uns:../unselected.bmp -i sel:../selected.bmp
|
||||
MKG3AFLAGS := -n basic:racing -i uns:../resources/unselected.bmp -i sel:../resources/selected.bmp
|
||||
|
||||
# Optional: add -flto to CFLAGS and LDFLAGS to enable link-time optimization
|
||||
# (LTO). Doing so will usually allow the compiler to generate much better code
|
||||
|
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
@ -33,7 +33,7 @@ namespace Display {
|
|||
show();
|
||||
|
||||
TTF_Init();
|
||||
font = TTF_OpenFont("font.ttf", 10);
|
||||
font = TTF_OpenFont("resources/font.ttf", 10);
|
||||
TTF_SizeText(font, "A", NULL, &textHeight);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue