-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 870 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 870 Bytes
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
CC = gcc
CFLAGS = -std=c23 -O2 -Wall -Wextra -I.
SRCS = main.c convertfile.c
TARGET = ConvertFile
all: $(TARGET)
$(TARGET): $(SRCS)
$(CC) $(CFLAGS) -o $(TARGET) $(SRCS)
# build an executable named 'main' that links main.c with helper modules
main: main.c convertfile.c
$(CC) $(CFLAGS) -o main main.c convertfile.c renderer.c
example: example_user.c convertfile.c
$(CC) $(CFLAGS) -o example_user example_user.c convertfile.c
tb_example: tb_example.c
# Build header-only termbox in this TU; define feature macros for portability
$(CC) $(CFLAGS) -DTB_IMPL -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -o tb_example tb_example.c
tb_player: tb_player.c convertfile.c
$(CC) $(CFLAGS) -DTB_IMPL -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -o tb_player tb_player.c convertfile.c
clean:
rm -f $(TARGET) example_user *.o
.PHONY: all example clean