src/Makefile

changeset 37
8a8cc6725b48
parent 32
86468a71dd73
child 44
b3da4096c607
equal deleted inserted replaced
36:e26b4ac1661c 37:8a8cc6725b48
25 25
26 include ../config.mk 26 include ../config.mk
27 27
28 BUILD_DIR=../build/lib 28 BUILD_DIR=../build/lib
29 29
30 SRC = context.c error.c window.c files.c shader.c font.c text.c scene.c \ 30 SRC = context.c error.c window.c files.c shader.c font.c text.c \
31 primitives.c 31 scene.c camera.c primitives.c
32 32
33 OBJ = $(SRC:%.c=$(BUILD_DIR)/%.o) 33 OBJ = $(SRC:%.c=$(BUILD_DIR)/%.o)
34 34
35 all: $(BUILD_DIR)/libascension.a FORCE 35 all: $(BUILD_DIR)/libascension.a FORCE
36 @echo "You have successfully ascended." 36 @echo "You have successfully ascended."
39 @echo "Creating library..." 39 @echo "Creating library..."
40 $(AR) $(ARFLAGS) $@ $^ 40 $(AR) $(ARFLAGS) $@ $^
41 41
42 FORCE: 42 FORCE:
43 43
44 $(BUILD_DIR)/camera.o: camera.c ascension/camera.h ascension/datatypes.h
45 @echo "Compiling $<"
46 $(CC) -o $@ $(CFLAGS) -c $<
47
44 $(BUILD_DIR)/context.o: context.c ascension/context.h \ 48 $(BUILD_DIR)/context.o: context.c ascension/context.h \
45 ascension/datatypes.h ascension/window.h ascension/primitives.h \ 49 ascension/datatypes.h ascension/window.h ascension/primitives.h \
46 ascension/mesh.h ascension/scene.h ascension/transform.h \ 50 ascension/mesh.h ascension/scene.h ascension/transform.h \
47 ascension/font.h ascension/error.h ascension/utils.h ascension/shader.h 51 ascension/camera.h ascension/font.h ascension/error.h ascension/utils.h \
52 ascension/shader.h
48 @echo "Compiling $<" 53 @echo "Compiling $<"
49 $(CC) -o $@ $(CFLAGS) -c $< 54 $(CC) -o $@ $(CFLAGS) -c $<
50 55
51 $(BUILD_DIR)/error.o: error.c ascension/context.h ascension/datatypes.h \ 56 $(BUILD_DIR)/error.o: error.c ascension/context.h ascension/datatypes.h \
52 ascension/window.h ascension/primitives.h ascension/mesh.h \ 57 ascension/window.h ascension/primitives.h ascension/mesh.h \
53 ascension/scene.h ascension/transform.h ascension/font.h \ 58 ascension/scene.h ascension/transform.h ascension/camera.h \
54 ascension/error.h ascension/utils.h 59 ascension/font.h ascension/error.h ascension/utils.h
55 @echo "Compiling $<" 60 @echo "Compiling $<"
56 $(CC) -o $@ $(CFLAGS) -c $< 61 $(CC) -o $@ $(CFLAGS) -c $<
57 62
58 $(BUILD_DIR)/files.o: files.c ascension/files.h ascension/error.h 63 $(BUILD_DIR)/files.o: files.c ascension/files.h ascension/error.h
59 @echo "Compiling $<" 64 @echo "Compiling $<"
60 $(CC) -o $@ $(CFLAGS) -c $< 65 $(CC) -o $@ $(CFLAGS) -c $<
61 66
62 $(BUILD_DIR)/font.o: font.c ascension/font.h ascension/context.h \ 67 $(BUILD_DIR)/font.o: font.c ascension/font.h ascension/context.h \
63 ascension/datatypes.h ascension/window.h ascension/primitives.h \ 68 ascension/datatypes.h ascension/window.h ascension/primitives.h \
64 ascension/mesh.h ascension/scene.h ascension/transform.h \ 69 ascension/mesh.h ascension/scene.h ascension/transform.h \
65 ascension/font.h ascension/error.h 70 ascension/camera.h ascension/font.h ascension/error.h
66 @echo "Compiling $<" 71 @echo "Compiling $<"
67 $(CC) -o $@ $(CFLAGS) -c $< 72 $(CC) -o $@ $(CFLAGS) -c $<
68 73
69 $(BUILD_DIR)/primitives.o: primitives.c ascension/primitives.h \ 74 $(BUILD_DIR)/primitives.o: primitives.c ascension/primitives.h \
70 ascension/mesh.h ascension/error.h ascension/context.h \ 75 ascension/mesh.h ascension/error.h ascension/context.h \
71 ascension/datatypes.h ascension/window.h ascension/primitives.h \ 76 ascension/datatypes.h ascension/window.h ascension/primitives.h \
72 ascension/scene.h ascension/transform.h ascension/font.h 77 ascension/scene.h ascension/transform.h ascension/camera.h \
78 ascension/font.h
73 @echo "Compiling $<" 79 @echo "Compiling $<"
74 $(CC) -o $@ $(CFLAGS) -c $< 80 $(CC) -o $@ $(CFLAGS) -c $<
75 81
76 $(BUILD_DIR)/scene.o: scene.c ascension/scene.h ascension/transform.h \ 82 $(BUILD_DIR)/scene.o: scene.c ascension/scene.h ascension/datatypes.h \
77 ascension/datatypes.h ascension/error.h 83 ascension/transform.h ascension/camera.h ascension/error.h \
84 ascension/context.h ascension/window.h ascension/primitives.h \
85 ascension/mesh.h ascension/scene.h ascension/font.h ascension/shader.h
78 @echo "Compiling $<" 86 @echo "Compiling $<"
79 $(CC) -o $@ $(CFLAGS) -c $< 87 $(CC) -o $@ $(CFLAGS) -c $<
80 88
81 $(BUILD_DIR)/shader.o: shader.c ascension/shader.h ascension/files.h \ 89 $(BUILD_DIR)/shader.o: shader.c ascension/shader.h ascension/files.h \
82 ascension/error.h 90 ascension/error.h
83 @echo "Compiling $<" 91 @echo "Compiling $<"
84 $(CC) -o $@ $(CFLAGS) -c $< 92 $(CC) -o $@ $(CFLAGS) -c $<
85 93
86 $(BUILD_DIR)/text.o: text.c ascension/text.h ascension/font.h \ 94 $(BUILD_DIR)/text.o: text.c ascension/text.h ascension/font.h \
87 ascension/scene.h ascension/transform.h ascension/datatypes.h \ 95 ascension/scene.h ascension/datatypes.h ascension/transform.h \
88 ascension/context.h ascension/window.h ascension/primitives.h \ 96 ascension/camera.h ascension/context.h ascension/window.h \
89 ascension/mesh.h ascension/error.h ascension/shader.h 97 ascension/primitives.h ascension/mesh.h ascension/error.h \
98 ascension/shader.h
90 @echo "Compiling $<" 99 @echo "Compiling $<"
91 $(CC) -o $@ $(CFLAGS) -c $< 100 $(CC) -o $@ $(CFLAGS) -c $<
92 101
93 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \ 102 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \
94 ascension/primitives.h ascension/mesh.h ascension/scene.h \ 103 ascension/primitives.h ascension/mesh.h ascension/scene.h \
95 ascension/transform.h ascension/context.h ascension/window.h \ 104 ascension/transform.h ascension/camera.h ascension/context.h \
96 ascension/font.h ascension/error.h ascension/utils.h 105 ascension/window.h ascension/font.h ascension/error.h ascension/utils.h
97 @echo "Compiling $<" 106 @echo "Compiling $<"
98 $(CC) -o $@ $(CFLAGS) -c $< 107 $(CC) -o $@ $(CFLAGS) -c $<
99 108

mercurial