Changed the Makefile structure and tested if libtar is found.
This commit is contained in:
parent
13e1b44325
commit
d7913dcc9f
10
Makefile
10
Makefile
|
|
@ -1,10 +0,0 @@
|
|||
SHELL=/usr/bin/env bash
|
||||
|
||||
CORE_LIB_DIR=lib
|
||||
CORE_SRC_DIR=src
|
||||
|
||||
# Build core steps
|
||||
build_core: build_core_lib build_core_src
|
||||
|
||||
include $(CORE_DIR)/$(CORE_LIB_DIR)/Makefile
|
||||
include $(CORE_DIR)/$(CORE_SRC_DIR)/Makefile
|
||||
|
|
@ -9,18 +9,18 @@ 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)/$(CORE_SRC_DIR)/headers
|
||||
CORE_CFLAGS = -Wall -Wextra -std=c17 -fPIC -g -DASSET_FILENAME=$(ASSET_OUTPUT)
|
||||
CORE_INCLUDE_DIRS = $(CORE_DIR)/headers
|
||||
CORE_LDFLAGS = $(shell sdl2-config --cflags --libs) -lSDL2_image
|
||||
|
||||
# Deduce objects
|
||||
CORE_OBJECTS = $(CORE_SOURCES:%.c=$(BUILD_DIR)/$(CORE_DIR)/$(CORE_SRC_DIR)/%.o)
|
||||
CORE_OBJECTS = $(CORE_SOURCES:%.c=$(BUILD_DIR)/$(CORE_DIR)/%.o)
|
||||
|
||||
# Current file nb to process
|
||||
CURRENT_CORE_FILE := 0
|
||||
|
||||
# Build core target
|
||||
build_core_src: core_setup count_core_build $(BUILD_DIR)/libCore.so core_end
|
||||
build_core: core_setup count_core_build $(BUILD_DIR)/libCore.so core_end
|
||||
|
||||
# Core build directories
|
||||
core_setup:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#include "asset_manager.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <libtar.h>
|
||||
#include "display.h"
|
||||
#include "linked_list.h"
|
||||
|
||||
#ifndef ASSET_FILENAME
|
||||
#define ASSET_FILENAME "game.data"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue