From a89d3a1e1b0436127335b48fb43fdfa258818026 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 24 Sep 2023 23:41:25 +0200 Subject: [PATCH] switched libxml for cjson --- Makefile | 10 +++--- compile_commands.json | 84 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 81 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 707da67..966bd22 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ project = fencer source = $(shell find src/ -type f -name *.c) -libraries = -lSDL2 -lSDL2_image $(shell xml2-config --cflags --libs) +libraries = -lSDL2 -lSDL2_image -lcjson -lm includes = -Iinclude -Isrc -args_debug = -Wall -g3 -args_package = -g0 +args_debug = -Wall -g3 -DVMATH_SDL=1 +args_package = -g0 -DVMATH_SDL=1 # build from source build: - cc $(source) $(args_debug) -o bin/$(project) $(libraries) $(includes) + cc $(source) $(args_debug) -o bin/$(project) $(libraries) $(includes) $(CFLAGS) b: build # build and run using debugger @@ -25,7 +25,7 @@ d: debug package: clean mkdir $(project) cp -r resources/ $(project)/resources/ - cc $(source) -o $(project)/$(project) $(args_package) $(libraries) $(includes) + cc $(source) -o $(project)/$(project) $(args_package) $(libraries) $(includes) $(CFLAGS) p: package # clean up build directories diff --git a/compile_commands.json b/compile_commands.json index 1f1a0d1..bf63341 100644 --- a/compile_commands.json +++ b/compile_commands.json @@ -4,8 +4,8 @@ "/usr/lib64/ccache/cc", "-c", "-Wall", - "-g", - "-I/usr/include/libxml2", + "-g3", + "-DVMATH_SDL=1", "-Iinclude", "-Isrc", "-o", @@ -21,8 +21,8 @@ "/usr/lib64/ccache/cc", "-c", "-Wall", - "-g", - "-I/usr/include/libxml2", + "-g3", + "-DVMATH_SDL=1", "-Iinclude", "-Isrc", "-o", @@ -38,8 +38,8 @@ "/usr/lib64/ccache/cc", "-c", "-Wall", - "-g", - "-I/usr/include/libxml2", + "-g3", + "-DVMATH_SDL=1", "-Iinclude", "-Isrc", "-o", @@ -55,8 +55,8 @@ "/usr/lib64/ccache/cc", "-c", "-Wall", - "-g", - "-I/usr/include/libxml2", + "-g3", + "-DVMATH_SDL=1", "-Iinclude", "-Isrc", "-o", @@ -66,5 +66,73 @@ "directory": "/home/sara/Documents/c-projects/fencer", "file": "/home/sara/Documents/c-projects/fencer/src/tilemap.c", "output": "/home/sara/Documents/c-projects/fencer/bin/fencer" + }, + { + "arguments": [ + "/usr/lib64/ccache/cc", + "-c", + "-Wall", + "-g3", + "-DVMATH_SDL=1", + "-Iinclude", + "-Isrc", + "-o", + "bin/fencer", + "src/camera.c" + ], + "directory": "/home/sara/Documents/c-projects/fencer", + "file": "/home/sara/Documents/c-projects/fencer/src/camera.c", + "output": "/home/sara/Documents/c-projects/fencer/bin/fencer" + }, + { + "arguments": [ + "/usr/lib64/ccache/cc", + "-c", + "-Wall", + "-g3", + "-DVMATH_SDL=1", + "-Iinclude", + "-Isrc", + "-o", + "bin/fencer", + "src/sprite.c" + ], + "directory": "/home/sara/Documents/c-projects/fencer", + "file": "/home/sara/Documents/c-projects/fencer/src/sprite.c", + "output": "/home/sara/Documents/c-projects/fencer/bin/fencer" + }, + { + "arguments": [ + "/usr/lib64/ccache/cc", + "-c", + "-Wall", + "-g3", + "-DVMATH_SDL=1", + "-Iinclude", + "-Isrc", + "-o", + "bin/fencer", + "src/spritesheet.c" + ], + "directory": "/home/sara/Documents/c-projects/fencer", + "file": "/home/sara/Documents/c-projects/fencer/src/spritesheet.c", + "output": "/home/sara/Documents/c-projects/fencer/bin/fencer" + }, + { + "arguments": [ + "/usr/lib64/ccache/cc", + "-c", + "-Wall", + "-g3", + "-DVMATH_SDL=1", + "-Iinclude", + "-Isrc", + "-o", + "bin/fencer", + "src/assets.c" + ], + "directory": "/home/sara/Documents/c-projects/fencer", + "file": "/home/sara/Documents/c-projects/fencer/src/assets.c", + "output": "/home/sara/Documents/c-projects/fencer/bin/fencer" } ]