src/Makefile

changeset 44
b3da4096c607
parent 37
8a8cc6725b48
child 48
6e5b5ba2752c
equal deleted inserted replaced
43:5a8c31904e44 44:b3da4096c607
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 \ 30 SRC = context.c glcontext.c error.c window.c files.c shader.c font.c text.c \
31 scene.c camera.c 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
44 $(BUILD_DIR)/camera.o: camera.c ascension/camera.h ascension/datatypes.h 44 $(BUILD_DIR)/camera.o: camera.c ascension/camera.h ascension/datatypes.h
45 @echo "Compiling $<" 45 @echo "Compiling $<"
46 $(CC) -o $@ $(CFLAGS) -c $< 46 $(CC) -o $@ $(CFLAGS) -c $<
47 47
48 $(BUILD_DIR)/context.o: context.c ascension/context.h \ 48 $(BUILD_DIR)/context.o: context.c ascension/context.h \
49 ascension/datatypes.h ascension/window.h ascension/primitives.h \ 49 ascension/datatypes.h ascension/window.h ascension/glcontext.h \
50 ascension/mesh.h ascension/scene.h ascension/transform.h \ 50 ascension/primitives.h ascension/mesh.h ascension/shader.h \
51 ascension/camera.h ascension/font.h ascension/error.h ascension/utils.h \ 51 ascension/scene.h ascension/transform.h ascension/camera.h \
52 ascension/shader.h 52 ascension/font.h ascension/error.h ascension/utils.h ascension/shader.h
53 @echo "Compiling $<" 53 @echo "Compiling $<"
54 $(CC) -o $@ $(CFLAGS) -c $< 54 $(CC) -o $@ $(CFLAGS) -c $<
55 55
56 $(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 \
57 ascension/window.h ascension/primitives.h ascension/mesh.h \ 57 ascension/window.h ascension/glcontext.h ascension/primitives.h \
58 ascension/scene.h ascension/transform.h ascension/camera.h \ 58 ascension/mesh.h ascension/shader.h ascension/scene.h \
59 ascension/font.h ascension/error.h ascension/utils.h 59 ascension/transform.h ascension/camera.h ascension/font.h \
60 ascension/error.h ascension/utils.h
60 @echo "Compiling $<" 61 @echo "Compiling $<"
61 $(CC) -o $@ $(CFLAGS) -c $< 62 $(CC) -o $@ $(CFLAGS) -c $<
62 63
63 $(BUILD_DIR)/files.o: files.c ascension/files.h ascension/error.h 64 $(BUILD_DIR)/files.o: files.c ascension/files.h ascension/error.h
64 @echo "Compiling $<" 65 @echo "Compiling $<"
65 $(CC) -o $@ $(CFLAGS) -c $< 66 $(CC) -o $@ $(CFLAGS) -c $<
66 67
67 $(BUILD_DIR)/font.o: font.c ascension/font.h ascension/context.h \ 68 $(BUILD_DIR)/font.o: font.c ascension/font.h ascension/context.h \
68 ascension/datatypes.h ascension/window.h ascension/primitives.h \ 69 ascension/datatypes.h ascension/window.h ascension/glcontext.h \
69 ascension/mesh.h ascension/scene.h ascension/transform.h \ 70 ascension/primitives.h ascension/mesh.h ascension/shader.h \
70 ascension/camera.h ascension/font.h ascension/error.h 71 ascension/scene.h ascension/transform.h ascension/camera.h \
72 ascension/font.h ascension/error.h
73 @echo "Compiling $<"
74 $(CC) -o $@ $(CFLAGS) -c $<
75
76 $(BUILD_DIR)/glcontext.o: glcontext.c ascension/glcontext.h \
77 ascension/primitives.h ascension/mesh.h ascension/shader.h \
78 ascension/error.h
71 @echo "Compiling $<" 79 @echo "Compiling $<"
72 $(CC) -o $@ $(CFLAGS) -c $< 80 $(CC) -o $@ $(CFLAGS) -c $<
73 81
74 $(BUILD_DIR)/primitives.o: primitives.c ascension/primitives.h \ 82 $(BUILD_DIR)/primitives.o: primitives.c ascension/primitives.h \
75 ascension/mesh.h ascension/error.h ascension/context.h \ 83 ascension/mesh.h ascension/error.h ascension/context.h \
76 ascension/datatypes.h ascension/window.h ascension/primitives.h \ 84 ascension/datatypes.h ascension/window.h ascension/glcontext.h \
77 ascension/scene.h ascension/transform.h ascension/camera.h \ 85 ascension/primitives.h ascension/shader.h ascension/scene.h \
78 ascension/font.h 86 ascension/transform.h ascension/camera.h ascension/font.h
79 @echo "Compiling $<" 87 @echo "Compiling $<"
80 $(CC) -o $@ $(CFLAGS) -c $< 88 $(CC) -o $@ $(CFLAGS) -c $<
81 89
82 $(BUILD_DIR)/scene.o: scene.c ascension/scene.h ascension/datatypes.h \ 90 $(BUILD_DIR)/scene.o: scene.c ascension/scene.h ascension/datatypes.h \
83 ascension/transform.h ascension/camera.h ascension/error.h \ 91 ascension/transform.h ascension/camera.h ascension/error.h \
84 ascension/context.h ascension/window.h ascension/primitives.h \ 92 ascension/context.h ascension/window.h ascension/glcontext.h \
85 ascension/mesh.h ascension/scene.h ascension/font.h ascension/shader.h 93 ascension/primitives.h ascension/mesh.h ascension/shader.h \
94 ascension/scene.h ascension/font.h ascension/shader.h
86 @echo "Compiling $<" 95 @echo "Compiling $<"
87 $(CC) -o $@ $(CFLAGS) -c $< 96 $(CC) -o $@ $(CFLAGS) -c $<
88 97
89 $(BUILD_DIR)/shader.o: shader.c ascension/shader.h ascension/files.h \ 98 $(BUILD_DIR)/shader.o: shader.c ascension/shader.h ascension/files.h \
90 ascension/error.h 99 ascension/error.h
92 $(CC) -o $@ $(CFLAGS) -c $< 101 $(CC) -o $@ $(CFLAGS) -c $<
93 102
94 $(BUILD_DIR)/text.o: text.c ascension/text.h ascension/font.h \ 103 $(BUILD_DIR)/text.o: text.c ascension/text.h ascension/font.h \
95 ascension/scene.h ascension/datatypes.h ascension/transform.h \ 104 ascension/scene.h ascension/datatypes.h ascension/transform.h \
96 ascension/camera.h ascension/context.h ascension/window.h \ 105 ascension/camera.h ascension/context.h ascension/window.h \
97 ascension/primitives.h ascension/mesh.h ascension/error.h \ 106 ascension/glcontext.h ascension/primitives.h ascension/mesh.h \
98 ascension/shader.h 107 ascension/shader.h ascension/error.h ascension/shader.h
99 @echo "Compiling $<" 108 @echo "Compiling $<"
100 $(CC) -o $@ $(CFLAGS) -c $< 109 $(CC) -o $@ $(CFLAGS) -c $<
101 110
102 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \ 111 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \
103 ascension/primitives.h ascension/mesh.h ascension/scene.h \ 112 ascension/glcontext.h ascension/primitives.h ascension/mesh.h \
104 ascension/transform.h ascension/camera.h ascension/context.h \ 113 ascension/shader.h ascension/scene.h ascension/transform.h \
105 ascension/window.h ascension/font.h ascension/error.h ascension/utils.h 114 ascension/camera.h ascension/context.h ascension/window.h \
115 ascension/font.h ascension/error.h ascension/utils.h
106 @echo "Compiling $<" 116 @echo "Compiling $<"
107 $(CC) -o $@ $(CFLAGS) -c $< 117 $(CC) -o $@ $(CFLAGS) -c $<
108 118

mercurial