Skip to content
Newer
Older
100644 56 lines (43 sloc) 1.37 KB
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
1 CFLAGS += -std=gnu99 -Wall -Wwrite-strings -pthread
262ea5e @trofi Makefile: added LIBS=-lrt -plthread
authored
2 LIBS = -lrt -lpthread
93ca069 Fixed the build on big endian machines (make BIG_ENDIAN=1).
Tilman Sauerbeck authored
3 ENDIAN_CFLAGS=
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
4 PREFIX ?= /usr/local
5
5d16742 Bumped version to 0.4.0.
Tilman Sauerbeck authored
6 VERSION := 0.4.0
542f249 Added the 'dist' make target and set the package version to 0.3.0.
Tilman Sauerbeck authored
7 TARBALL := xmms2-scrobbler-$(VERSION).tar.gz
8
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
9 XMMS_CFLAGS := `pkg-config xmms2-client --cflags`
10 XMMS_LDFLAGS := `pkg-config xmms2-client --libs`
11 CURL_CFLAGS := `pkg-config libcurl --cflags`
12 CURL_LDFLAGS := `pkg-config libcurl --libs`
13
14 ifndef VERBOSE
15 QUIET_CC = @echo ' ' CC $@;
16 QUIET_LINK = @echo ' ' LINK $@;
b57b545 Put the xmms2-scrobbler binary in bin/ like README says.
Tilman Sauerbeck authored
17 QUIET_MKDIR = @echo ' ' MKDIR $@;
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
18 endif
19
93ca069 Fixed the build on big endian machines (make BIG_ENDIAN=1).
Tilman Sauerbeck authored
20 ifdef BIG_ENDIAN
21 ENDIAN_CFLAGS=-DWORDS_BIGENDIAN
22 endif
23
b57b545 Put the xmms2-scrobbler binary in bin/ like README says.
Tilman Sauerbeck authored
24 BINARY := bin/xmms2-scrobbler
10280d5 Added a primitive linked list implementation.
Tilman Sauerbeck authored
25 OBJECTS := src/xmms2-scrobbler.o \
26 src/list.o \
27 src/queue.o \
28 src/strbuf.o \
29 src/md5.o \
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
30 src/submission.o
31
b57b545 Put the xmms2-scrobbler binary in bin/ like README says.
Tilman Sauerbeck authored
32 all: $(BINARY)
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
33
b57b545 Put the xmms2-scrobbler binary in bin/ like README says.
Tilman Sauerbeck authored
34 install: $(BINARY)
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
35 install -d $(DESTDIR)$(PREFIX)/bin
b57b545 Put the xmms2-scrobbler binary in bin/ like README says.
Tilman Sauerbeck authored
36 install -m 755 $(BINARY) $(DESTDIR)$(PREFIX)/bin
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
37
b57b545 Put the xmms2-scrobbler binary in bin/ like README says.
Tilman Sauerbeck authored
38 $(BINARY): $(OBJECTS) bin
b758e1d @trofi Makefile: set proper link order for libraries
authored
39 $(QUIET_LINK)$(CC) $(OBJECTS) -o $@ $(LDFLAGS) $(XMMS_LDFLAGS) $(CURL_LDFLAGS) $(LIBS)
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
40
41 src/%.o : src/%.c
93ca069 Fixed the build on big endian machines (make BIG_ENDIAN=1).
Tilman Sauerbeck authored
42 $(QUIET_CC)$(CC) $(CFLAGS) $(XMMS_CFLAGS) $(CURL_CFLAGS) $(ENDIAN_CFLAGS) -o $@ -c $<
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
43
b57b545 Put the xmms2-scrobbler binary in bin/ like README says.
Tilman Sauerbeck authored
44 bin:
45 $(QUIET_MKDIR)mkdir bin
46
542f249 Added the 'dist' make target and set the package version to 0.3.0.
Tilman Sauerbeck authored
47 dist:
48 rm -rf $(TARBALL) xmms2-scrobbler-$(VERSION)
49 git archive --format=tar --prefix=xmms2-scrobbler-$(VERSION)/ HEAD | tar -x
50 git log > xmms2-scrobbler-$(VERSION)/ChangeLog
51 tar czvf $(TARBALL) xmms2-scrobbler-$(VERSION)
52 rm -rf xmms2-scrobbler-$(VERSION)
40277cc Initial commit of the C rewrite.
Tilman Sauerbeck authored
53
54 clean:
8d245b9 Don't error out in the 'clean' target if bin/ doesn't exit.
Tilman Sauerbeck authored
55 rm -rf $(OBJECTS) bin
Something went wrong with that request. Please try again.