src/Makefile

changeset 37
8a8cc6725b48
parent 32
86468a71dd73
child 44
b3da4096c607
--- a/src/Makefile	Wed Mar 06 23:38:17 2024 +0100
+++ b/src/Makefile	Fri Mar 15 00:06:59 2024 +0100
@@ -27,8 +27,8 @@
 
 BUILD_DIR=../build/lib
 
-SRC = context.c error.c window.c files.c shader.c font.c text.c scene.c \
-	  primitives.c
+SRC = context.c error.c window.c files.c shader.c font.c text.c \
+      scene.c camera.c primitives.c
 
 OBJ = $(SRC:%.c=$(BUILD_DIR)/%.o)
 
@@ -41,17 +41,22 @@
 
 FORCE:
 
+$(BUILD_DIR)/camera.o: camera.c ascension/camera.h ascension/datatypes.h
+	@echo "Compiling $<"
+	$(CC) -o $@ $(CFLAGS) -c $<
+
 $(BUILD_DIR)/context.o: context.c ascension/context.h \
  ascension/datatypes.h ascension/window.h ascension/primitives.h \
  ascension/mesh.h ascension/scene.h ascension/transform.h \
- ascension/font.h ascension/error.h ascension/utils.h ascension/shader.h
+ ascension/camera.h ascension/font.h ascension/error.h ascension/utils.h \
+ ascension/shader.h
 	@echo "Compiling $<"
 	$(CC) -o $@ $(CFLAGS) -c $<
 
 $(BUILD_DIR)/error.o: error.c ascension/context.h ascension/datatypes.h \
  ascension/window.h ascension/primitives.h ascension/mesh.h \
- ascension/scene.h ascension/transform.h ascension/font.h \
- ascension/error.h ascension/utils.h
+ ascension/scene.h ascension/transform.h ascension/camera.h \
+ ascension/font.h ascension/error.h ascension/utils.h
 	@echo "Compiling $<"
 	$(CC) -o $@ $(CFLAGS) -c $<
 
@@ -62,19 +67,22 @@
 $(BUILD_DIR)/font.o: font.c ascension/font.h ascension/context.h \
  ascension/datatypes.h ascension/window.h ascension/primitives.h \
  ascension/mesh.h ascension/scene.h ascension/transform.h \
- ascension/font.h ascension/error.h
+ ascension/camera.h ascension/font.h ascension/error.h
 	@echo "Compiling $<"
 	$(CC) -o $@ $(CFLAGS) -c $<
 
 $(BUILD_DIR)/primitives.o: primitives.c ascension/primitives.h \
  ascension/mesh.h ascension/error.h ascension/context.h \
  ascension/datatypes.h ascension/window.h ascension/primitives.h \
- ascension/scene.h ascension/transform.h ascension/font.h
+ ascension/scene.h ascension/transform.h ascension/camera.h \
+ ascension/font.h
 	@echo "Compiling $<"
 	$(CC) -o $@ $(CFLAGS) -c $<
 
-$(BUILD_DIR)/scene.o: scene.c ascension/scene.h ascension/transform.h \
- ascension/datatypes.h ascension/error.h
+$(BUILD_DIR)/scene.o: scene.c ascension/scene.h ascension/datatypes.h \
+ ascension/transform.h ascension/camera.h ascension/error.h \
+ ascension/context.h ascension/window.h ascension/primitives.h \
+ ascension/mesh.h ascension/scene.h ascension/font.h ascension/shader.h
 	@echo "Compiling $<"
 	$(CC) -o $@ $(CFLAGS) -c $<
 
@@ -84,16 +92,17 @@
 	$(CC) -o $@ $(CFLAGS) -c $<
 
 $(BUILD_DIR)/text.o: text.c ascension/text.h ascension/font.h \
- ascension/scene.h ascension/transform.h ascension/datatypes.h \
- ascension/context.h ascension/window.h ascension/primitives.h \
- ascension/mesh.h ascension/error.h ascension/shader.h
+ ascension/scene.h ascension/datatypes.h ascension/transform.h \
+ ascension/camera.h ascension/context.h ascension/window.h \
+ ascension/primitives.h ascension/mesh.h ascension/error.h \
+ ascension/shader.h
 	@echo "Compiling $<"
 	$(CC) -o $@ $(CFLAGS) -c $<
 
 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \
  ascension/primitives.h ascension/mesh.h ascension/scene.h \
- ascension/transform.h ascension/context.h ascension/window.h \
- ascension/font.h ascension/error.h ascension/utils.h
+ ascension/transform.h ascension/camera.h ascension/context.h \
+ ascension/window.h ascension/font.h ascension/error.h ascension/utils.h
 	@echo "Compiling $<"
 	$(CC) -o $@ $(CFLAGS) -c $<
 

mercurial