aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: 79cd34b999c42f18e7302c1c49bba773fb82df4a (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
CC = gcc
LD = gcc
RM = rm -f
CFLAGS = -lcwalk -linih -lcrypto

OBJECTS := $(patsubst %.c,%.o, *.c)
DESTDIR = /usr/local

all: musicopy

%.o: %.c
	$(CC) -static -c $< $(CFLAGS)

musicopy: $(OBJECTS)
	$(CC) $(OBJECTS) $(CFLAGS) -o musicopy

install: musicopy
	mkdir -p $(DESTDIR)/bin
	cp -v musicopy $(DESTDIR)/bin

uninstall:
	rm -v $(DESTDIR)/bin/musicopy

clean:
	$(RM) musicopy

distclean: clean
	$(RM) *.o