Fri, 19 Apr 2024 22:28:29 +0200
replaces broken font cache with improved cache - fixes #387
1 # Copyright 2023 Mike Becker. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are met:
5 #
6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer.
8 #
9 # 2. Redistributions in binary form must reproduce the above copyright
10 # notice, this list of conditions and the following disclaimer in the
11 # documentation and/or other materials provided with the distribution.
12 #
13 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
17 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 # POSSIBILITY OF SUCH DAMAGE.
24 #
26 include ../config.mk
28 BUILD_DIR=../build/lib
30 SRC = context.c glcontext.c error.c window.c files.c shader.c font.c text.c \
31 texture.c scene.c camera.c primitives.c
33 OBJ = $(SRC:%.c=$(BUILD_DIR)/%.o)
35 all: $(BUILD_DIR)/libascension.a FORCE
36 @echo "You have successfully ascended."
38 $(BUILD_DIR)/libascension.a: $(OBJ)
39 @echo "Creating library..."
40 $(AR) $(ARFLAGS) $@ $^
42 FORCE:
44 $(BUILD_DIR)/camera.o: camera.c ascension/camera.h ascension/datatypes.h
45 @echo "Compiling $<"
46 $(CC) -o $@ $(CFLAGS) -c $<
48 $(BUILD_DIR)/context.o: context.c ascension/context.h \
49 ascension/datatypes.h ascension/window.h ascension/glcontext.h \
50 ascension/primitives.h ascension/mesh.h ascension/shader.h \
51 ascension/scene.h ascension/transform.h ascension/camera.h \
52 ascension/input.h ascension/ui/font.h ascension/error.h \
53 ascension/utils.h
54 @echo "Compiling $<"
55 $(CC) -o $@ $(CFLAGS) -c $<
57 $(BUILD_DIR)/error.o: error.c ascension/context.h ascension/datatypes.h \
58 ascension/window.h ascension/glcontext.h ascension/primitives.h \
59 ascension/mesh.h ascension/shader.h ascension/scene.h \
60 ascension/transform.h ascension/camera.h ascension/input.h \
61 ascension/ui/font.h ascension/error.h ascension/utils.h
62 @echo "Compiling $<"
63 $(CC) -o $@ $(CFLAGS) -c $<
65 $(BUILD_DIR)/files.o: files.c ascension/files.h ascension/error.h
66 @echo "Compiling $<"
67 $(CC) -o $@ $(CFLAGS) -c $<
69 $(BUILD_DIR)/font.o: font.c ascension/ui/font.h ascension/context.h \
70 ascension/datatypes.h ascension/window.h ascension/glcontext.h \
71 ascension/primitives.h ascension/mesh.h ascension/shader.h \
72 ascension/scene.h ascension/transform.h ascension/camera.h \
73 ascension/input.h ascension/ui/font.h ascension/error.h
74 @echo "Compiling $<"
75 $(CC) -o $@ $(CFLAGS) -c $<
77 $(BUILD_DIR)/glcontext.o: glcontext.c ascension/glcontext.h \
78 ascension/primitives.h ascension/mesh.h ascension/shader.h \
79 ascension/error.h
80 @echo "Compiling $<"
81 $(CC) -o $@ $(CFLAGS) -c $<
83 $(BUILD_DIR)/primitives.o: primitives.c ascension/primitives.h \
84 ascension/mesh.h ascension/error.h ascension/context.h \
85 ascension/datatypes.h ascension/window.h ascension/glcontext.h \
86 ascension/primitives.h ascension/shader.h ascension/scene.h \
87 ascension/transform.h ascension/camera.h ascension/input.h \
88 ascension/ui/font.h
89 @echo "Compiling $<"
90 $(CC) -o $@ $(CFLAGS) -c $<
92 $(BUILD_DIR)/scene.o: scene.c ascension/scene.h ascension/datatypes.h \
93 ascension/transform.h ascension/camera.h ascension/context.h \
94 ascension/window.h ascension/glcontext.h ascension/primitives.h \
95 ascension/mesh.h ascension/shader.h ascension/scene.h ascension/input.h \
96 ascension/ui/font.h ascension/utils.h ascension/shader.h
97 @echo "Compiling $<"
98 $(CC) -o $@ $(CFLAGS) -c $<
100 $(BUILD_DIR)/shader.o: shader.c ascension/shader.h ascension/files.h \
101 ascension/error.h
102 @echo "Compiling $<"
103 $(CC) -o $@ $(CFLAGS) -c $<
105 $(BUILD_DIR)/text.o: text.c ascension/ui/text.h ascension/ui/font.h \
106 ascension/ui/../scene.h ascension/ui/../datatypes.h \
107 ascension/ui/../transform.h ascension/ui/../camera.h \
108 ascension/ui/../texture.h ascension/ui/../utils.h ascension/context.h \
109 ascension/datatypes.h ascension/window.h ascension/glcontext.h \
110 ascension/primitives.h ascension/mesh.h ascension/shader.h \
111 ascension/scene.h ascension/input.h ascension/ui/font.h \
112 ascension/error.h ascension/shader.h
113 @echo "Compiling $<"
114 $(CC) -o $@ $(CFLAGS) -c $<
116 $(BUILD_DIR)/texture.o: texture.c ascension/texture.h ascension/error.h
117 @echo "Compiling $<"
118 $(CC) -o $@ $(CFLAGS) -c $<
120 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \
121 ascension/glcontext.h ascension/primitives.h ascension/mesh.h \
122 ascension/shader.h ascension/scene.h ascension/transform.h \
123 ascension/camera.h ascension/context.h ascension/window.h \
124 ascension/input.h ascension/ui/font.h ascension/error.h \
125 ascension/utils.h
126 @echo "Compiling $<"
127 $(CC) -o $@ $(CFLAGS) -c $<