summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 9e51d0644eac6798b5c248179a55206998f8c868 (plain) (blame)
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
PREFIX ?= /usr/local
BINDIR ?= /bin

CFLAGS = -Wunused-variable -Wunused-function -Wconversion

ifeq ($(DEBUG),1)
CFLAGS += -Og -g
else
CFLAGS += -O2
endif

all: mplay

clean:
	rm -f mplay

mplay: mplay.c
	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)

install:
	install -m755 mplay -t "$(DESTDIR)$(PREFIX)$(BINDIR)"

uninstall:
	rm -f "$(DESTDIR)$(PREFIX)$(BINDIR)/mplay"

.PHONY: all clean install uninstall