aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
blob: 722c05327e69d9420a093d07565dcb64a813f9c3 (plain)
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
CC = gcc

CFLAGS = -std=c99 -Wall -O2

LUAJIT = yes

ifeq ($(LUAJIT),yes)
LUA_CFLAGS = $(shell pkg-config --cflags luajit)
LUA_LDFLAGS = $(shell pkg-config --libs luajit)
else
LUA_CFLAGS = $(shell pkg-config --cflags lua5.1)
LUA_LDFLAGS = $(shell pkg-config --libs lua5.1)
endif

READLINE_CFLAGS =
READLINE_LDFLAGS = -lreadline -lhistory

JACK_CFLAGS := $(shell pkg-config --cflags jack)
JACK_LDFLAGS := $(shell pkg-config --libs jack)

CFLAGS += $(LUA_CFLAGS) $(READLINE_CFLAGS) $(JACK_CFLAGS)
LDFLAGS += $(LUA_LDFLAGS) $(READLINE_LDFLAGS) $(JACK_LDFLAGS)

all : applause

applause : applause.o
	$(CC) -o $@ $< $(LDFLAGS)

clean:
	$(RM) *.o applause