summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile25
1 files changed, 17 insertions, 8 deletions
diff --git a/Rakefile b/Rakefile
index 1e3bc5b..c2e67d2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,4 @@
-# Copyright 2022 Frederico de Oliveira Linhares
+# Copyright 2022-2023 Frederico de Oliveira Linhares
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -50,10 +50,11 @@ GLSL_FILES = FileList[
SPV_FILES = GLSL_FILES.ext('.spv')
LIBRARIES = [
- 'SDL2',
- 'SDL2_mixer',
- 'm',
- 'yaml-cpp'
+ 'SDL2',
+ 'SDL2_mixer',
+ 'freetype',
+ 'm',
+ 'yaml-cpp'
]
case OS
when :windows
@@ -68,9 +69,17 @@ when :linux
])
end
+PKG_CONFIG = [
+ 'freetype2'
+]
+
+pkg_arguments = PKG_CONFIG.inject('') {_1 + "#{_2} "}
+PKG_VALUES = %x[pkg-config --cflags #{pkg_arguments}]
+
CLEAN.include(
FileList[
- 'src/**/*.o'
+ 'src/**/*.o',
+ 'glsl/*.spv'
]
)
@@ -99,8 +108,8 @@ task :doc do
end
rule '.o' => ['.cpp', "mruby-#{MRUBY_VERSION}"] do |t|
- system("g++ -D DEBUG=1 -c -std=c++20 -Imruby-#{MRUBY_VERSION}/include/ "\
- "#{t.source} -o #{t.name}")
+ system("g++ #{t.source} -o #{t.name} -g -D DEBUG=1 -c -std=c++20 "\
+ "-Imruby-#{MRUBY_VERSION}/include/ #{PKG_VALUES}")
end
task :pkg do