-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (26 loc) · 894 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.PHONY: all clean
ASM=nasm
ASMFLAGS=-felf64 -g
CC=gcc
CFLAGS=-Iinclude/ -std=c17 -pedantic -Wall -Werror -ggdb -c
LINKER=$(CC)
LDFLAGS=-no-pie -g
BUILDDIR=build
SRCDIR=src
MKDIR=mkdir -p
RM=rm -rf
all: $(BUILDDIR)
$(ASM) $(ASMFLAGS) -o $(BUILDDIR)/sepia.asm.o $(SRCDIR)/sepia.asm
$(CC) $(CFLAGS) -o $(BUILDDIR)/dimensions.o $(SRCDIR)/dimensions.c
$(CC) $(CFLAGS) -o $(BUILDDIR)/image.o $(SRCDIR)/image.c
$(CC) $(CFLAGS) -o $(BUILDDIR)/file.o $(SRCDIR)/file.c
$(CC) $(CFLAGS) -o $(BUILDDIR)/sepia.o $(SRCDIR)/sepia.c
$(CC) $(CFLAGS) -o $(BUILDDIR)/transform.o $(SRCDIR)/transform.c
$(CC) $(CFLAGS) -o $(BUILDDIR)/bmp.o $(SRCDIR)/bmp.c
$(CC) $(CFLAGS) -o $(BUILDDIR)/utils.o $(SRCDIR)/utils.c
$(CC) $(CFLAGS) -o $(BUILDDIR)/main.o $(SRCDIR)/main.c
$(LINKER) $(LDFLAGS) -o $(BUILDDIR)/sepia-filter $(BUILDDIR)/*.o
$(BUILDDIR):
$(MKDIR) $@
clean:
$(RM) $(BUILDDIR)