diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c3b92ed --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +SHELL=/usr/bin/env bash + +CORE_LIB_DIR=lib +CORE_SRC_DIR=src + +# Build core steps +build_core: build_core_src + +include $(CORE_DIR)/$(CORE_LIB_DIR)/Makefile +include $(CORE_DIR)/$(CORE_SRC_DIR)/Makefile diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 0000000..ad618e5 --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,14 @@ +SHELL=/usr/bin/env bash + +LIBTAR_DIR=libtar + +build_core_lib: core_lib_setup build_libtar + +core_lib_setup: + @echo -e "Building core libs" + +build_libtar: + @echo -e "--Building libtar (1/1)" + $(Q)cd $(CORE_DIR)/$(CORE_LIB_DIR)/$(LIBTAR_DIR) && autoreconf --force --install + $(Q)cd $(CORE_DIR)/$(CORE_LIB_DIR)/$(LIBTAR_DIR) && ./configure + $(Q)make --no-print-directory -C $(CORE_DIR)/$(CORE_LIB_DIR)/$(LIBTAR_DIR) diff --git a/lib/libtar b/lib/libtar new file mode 160000 index 0000000..6d0ab4c --- /dev/null +++ b/lib/libtar @@ -0,0 +1 @@ +Subproject commit 6d0ab4c78e7a8305c36a0c3d63fd25cd1493de65 diff --git a/src/Makefile b/src/Makefile index 625307c..2710653 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,17 +10,17 @@ CORE_SOURCES := \ # Compiler and flags CORE_CC = gcc CORE_CFLAGS = -Wall -Wextra -std=c17 -fPIC -g -DASSET_FILE=$(ASSET_OUTPUT) -CORE_INCLUDE_DIRS = $(CORE_DIR)/headers -CORE_LDFLAGS = $(shell sdl2-config --cflags --libs) +CORE_INCLUDE_DIRS = $(CORE_DIR)/$(CORE_SRC_DIR)/headers +CORE_LDFLAGS = $(shell sdl2-config --cflags --libs) -lSDL2_image # Deduce objects -CORE_OBJECTS = $(CORE_SOURCES:%.c=$(BUILD_DIR)/$(CORE_DIR)/%.o) +CORE_OBJECTS = $(CORE_SOURCES:%.c=$(BUILD_DIR)/$(CORE_DIR)/$(CORE_SRC_DIR)/%.o) # Current file nb to process CURRENT_CORE_FILE := 0 # Build core target -build_core: core_setup count_core_build $(BUILD_DIR)/libCore.so core_end +build_core_src: core_setup count_core_build $(BUILD_DIR)/libCore.so core_end # Core build directories core_setup: diff --git a/src/asset_manager.c b/src/asset_manager.c index 5c2afc1..bf67791 100644 --- a/src/asset_manager.c +++ b/src/asset_manager.c @@ -1,17 +1,6 @@ #include "asset_manager.h" -#include +#include #include "display.h" #include "linked_list.h" - - -static void temporary_extract_asset(const char *path) -{ - -} - -SDL_Texture load_image(const char *path) -{ - IMG_LoadTexture(renderer, path); -} \ No newline at end of file