| 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 |
30 SRC = context.c error.c window.c font.c |
| 31 |
31 |
| 32 OBJ = $(SRC:%.c=$(BUILD_DIR)/%.o) |
32 OBJ = $(SRC:%.c=$(BUILD_DIR)/%.o) |
| 33 |
33 |
| 34 all: $(BUILD_DIR)/libascension.a FORCE |
34 all: $(BUILD_DIR)/libascension.a FORCE |
| 35 @echo "You have successfully ascended." |
35 @echo "You have successfully ascended." |
| 39 $(AR) $(ARFLAGS) $@ $^ |
39 $(AR) $(ARFLAGS) $@ $^ |
| 40 |
40 |
| 41 FORCE: |
41 FORCE: |
| 42 |
42 |
| 43 $(BUILD_DIR)/context.o: context.c ascension/context.h ascension/window.h \ |
43 $(BUILD_DIR)/context.o: context.c ascension/context.h ascension/window.h \ |
| 44 ascension/datatypes.h ascension/utils.h |
44 ascension/datatypes.h ascension/font.h ascension/error.h \ |
| |
45 ascension/utils.h |
| 45 @echo "Compiling $<" |
46 @echo "Compiling $<" |
| 46 $(CC) -o $@ $(CFLAGS) -c $< |
47 $(CC) -o $@ $(CFLAGS) -c $< |
| 47 |
48 |
| 48 $(BUILD_DIR)/error.o: error.c ascension/context.h ascension/window.h \ |
49 $(BUILD_DIR)/error.o: error.c ascension/context.h ascension/window.h \ |
| 49 ascension/datatypes.h ascension/error.h ascension/utils.h |
50 ascension/datatypes.h ascension/font.h ascension/error.h \ |
| |
51 ascension/utils.h |
| |
52 @echo "Compiling $<" |
| |
53 $(CC) -o $@ $(CFLAGS) -c $< |
| |
54 |
| |
55 $(BUILD_DIR)/font.o: font.c ascension/font.h ascension/context.h \ |
| |
56 ascension/window.h ascension/datatypes.h ascension/font.h \ |
| |
57 ascension/error.h |
| 50 @echo "Compiling $<" |
58 @echo "Compiling $<" |
| 51 $(CC) -o $@ $(CFLAGS) -c $< |
59 $(CC) -o $@ $(CFLAGS) -c $< |
| 52 |
60 |
| 53 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \ |
61 $(BUILD_DIR)/window.o: window.c ascension/window.h ascension/datatypes.h \ |
| 54 ascension/context.h ascension/window.h ascension/error.h |
62 ascension/context.h ascension/window.h ascension/font.h \ |
| |
63 ascension/error.h ascension/utils.h |
| 55 @echo "Compiling $<" |
64 @echo "Compiling $<" |
| 56 $(CC) -o $@ $(CFLAGS) -c $< |
65 $(CC) -o $@ $(CFLAGS) -c $< |
| 57 |
66 |