-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 931 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
CFLAGS = -Wall -Wextra -mtune=native `sdl2-config --cflags`
LDFLAGS = `sdl2-config --libs` -lSDL2_image -lm
LDFLAGS1 = $(LDFLAGS) -lcurl
LDFLAGS2 = $(LDFLAGS) -ljansson
LDFLAGS3 = $(LDFLAGS1) $(LDFLAGS2)
.SUFFIXES:
.SUFFIXES: .c .o
srcdir =src/
TARGETS = drag_drop tokenize shader_drop shader_drop2
.PHONY: all
all: $(TARGETS)
# take file and text drop
drag_drop: $(srcdir)helper.c $(srcdir)main.c
$(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
# tokenize the output
tokenize: $(srcdir)helper.c $(srcdir)main2.c
$(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
# drop shadertoy shader and download it, plus texture if applicable
shader_drop: $(srcdir)helper.c $(srcdir)main3.c
$(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS3)
# API-less drop shadertoy shader and download it, plus texture if applicable
shader_drop2: $(srcdir)helper.c $(srcdir)main4.c
$(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS3)
.PHONY: clean
clean:
@rm $(TARGETS) 2>/dev/null || true