libSDL2 static build and link

This commit is contained in:
Alan Youngblood 2022-09-30 16:09:12 -04:00
parent 1dec4347e0
commit 391fcedc37
4 changed files with 5 additions and 5 deletions

View File

@ -15,9 +15,9 @@ DEPS := $(OBJS:.o=.d)
INC_DIRS := $(shell find $(SRC_DIRS) -type d) INC_DIRS := $(shell find $(SRC_DIRS) -type d)
INC_FLAGS := $(addprefix -I,$(INC_DIRS)) INC_FLAGS := $(addprefix -I,$(INC_DIRS))
#-I$(LIBXML_ROOT) -Ilibsdl2_image -Ilibsdl2_mixer #-I$(LIBXML_ROOT) -Ilibsdl2_image -Ilibsdl2_mixer
CPPFLAGS ?= $(INC_FLAGS) -Ilibtmx-parser/src -Ilibtmx-parser/libs/tinyxml2 -MMD -MP -w CPPFLAGS ?= $(INC_FLAGS) -Ilibsdl2/include -Ilibtmx-parser/src -Ilibtmx-parser/libs/tinyxml2 -MMD -MP -w
# libxml2/.libs/libxml2.a -lSDL2_image -lSDL2_mixer # libxml2/.libs/libxml2.a -lSDL2_image -lSDL2_mixer -lSDL2
LINKER_FLAGS = -lSDL2 libsdl2_image/.libs/libSDL2_image.a libsdl2_mixer/build/.libs/libSDL2_mixer.a libtmx-parser/libtmxparser.a LINKER_FLAGS = libsdl2/build/.libs/libSDL2.a libsdl2_image/.libs/libSDL2_image.a libsdl2_mixer/build/.libs/libSDL2_mixer.a libtmx-parser/libtmxparser.a
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS) $(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
# $(CC) $(OBJS) -o $@ $(LDFLAGS) # $(CC) $(OBJS) -o $@ $(LDFLAGS)
$(CXX) $(OBJS) $(LINKER_FLAGS) -o $@ $(CXX) $(OBJS) $(LINKER_FLAGS) -o $@

Binary file not shown.

View File

@ -9,7 +9,7 @@
#define SRC_ECS_TILEMAPCOMPONENT_H_ #define SRC_ECS_TILEMAPCOMPONENT_H_
#include "ECS.h" #include "ECS.h"
#include "SDL2/SDL.h" #include "../../libsdl2/include/SDL.h"
#include "../assetmgr/AssetManager.h" #include "../assetmgr/AssetManager.h"
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>

View File

@ -7,7 +7,7 @@
#ifndef GAME_HPP_ #ifndef GAME_HPP_
#define GAME_HPP_ #define GAME_HPP_
#include "SDL2/SDL.h" #include "../../libsdl2/include/SDL.h"
#include "../../libsdl2_image/SDL_image.h" #include "../../libsdl2_image/SDL_image.h"
#include "../../libsdl2_mixer/SDL_mixer.h" #include "../../libsdl2_mixer/SDL_mixer.h"
#include <stdio.h> #include <stdio.h>