File tree Expand file tree Collapse file tree 3 files changed +28
-20
lines changed Expand file tree Collapse file tree 3 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ Module.symvers
51
51
Mkfile.old
52
52
dkms.conf
53
53
54
+ build /
54
55
output. * .png
55
56
.cache /
56
57
Original file line number Diff line number Diff line change 1
- BUILD_DIR =build/
1
+ CC =gcc
2
+ CFLAGS =-Isrc/ -Iinclude/ -std=c99 -Wall -MMD -MP -O0 -g
3
+ LFLAGS =-lm
4
+ BUILD =build
5
+ BIN =$(BUILD ) /imgc
2
6
3
- gen :
4
- @meson setup $(BUILD_DIR ) -Db_sanitize=address,undefined
7
+ SOURCES =src/main.c src/blend.c src/image.c src/impl.c
8
+ OBJECTS=$(SOURCES:.c =.c.o)
9
+ OBJECTS: =$(patsubst % ,$(BUILD ) /% ,$(OBJECTS ) )
10
+ DEPENDS=$(OBJECTS:.o =.d)
5
11
6
- all :
7
- @ninja -C $(BUILD_DIR )
12
+ -include $(DEPENDS )
13
+
14
+ all : $(BIN )
15
+
16
+ $(BUILD ) /% .c.o : % .c
17
+ @echo " CC -" $<
18
+ @mkdir -p " $$ (dirname " $@ " )"
19
+ @$(CC ) $(CFLAGS ) -c $< -o $@
20
+
21
+ $(BIN ) : $(OBJECTS )
22
+ @echo " LD -" $@
23
+ @$(CXX ) $(LFLAGS ) $(OBJECTS ) -o $@
24
+
25
+ .PHONY : clean
26
+
27
+ clean :
28
+ @$(RM ) -rv $(BIN ) $(BUILD )
8
29
9
30
run : all
10
- @./build/imgc
31
+ @$( BIN )
11
32
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments