File: Makefile

package info (click to toggle)
id3 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 120 kB
  • sloc: ansic: 456; makefile: 52
file content (56 lines) | stat: -rw-r--r-- 1,241 bytes parent folder | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
PRODUCT = id3
VERSION = 1.1.0

SHELL = /bin/sh

STD_CPPFLAGS ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700

LFS_CPPFLAGS ?= `getconf LFS_CFLAGS || echo "-D_FILE_OFFSET_BITS=64"`
LFS_LDFLAGS ?= `getconf LFS_LDFLAGS || echo ""`

STD_CFLAGS ?= -std=c99
WARN_CFLAGS ?= -Wall -Wextra -Wbad-function-cast \
	-Wcast-align -Wcast-qual -Wchar-subscripts -Winline \
	-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
	-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings

CC ?= gcc
CPPFLAGS ?=
CPPFLAGS += ${STD_CPPFLAGS} ${LFS_CPPFLAGS}
CFLAGS ?= -g -O2
CFLAGS += ${STD_CFLAGS} ${WARN_CFLAGS}
LDFLAGS ?=
LDFLAGS += ${LFS_LDFLAGS}
LIBS = 
DEFS =  
INSTALL ?= /usr/bin/install -c
STRIP ?= -s

# Installation directories
prefix = ${DESTDIR}/usr
exec_prefix = ${prefix}
mandir = ${prefix}/share/man/man1
bindir = ${exec_prefix}/bin

INCL = 
SRCS = id3.c
OBJS = $(SRCS:.c=.o)

.SUFFIXES: .c .o

.c.o:
	$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $<

all: $(PRODUCT)

$(PRODUCT): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

clean:
	rm -f *~ *.o core $(PRODUCT)

install: $(PRODUCT)
	$(INSTALL) -d -m 755 $(bindir)
	$(INSTALL) $(STRIP) -m 755 $(PRODUCT) $(bindir)
	$(INSTALL) -d -m 755 $(mandir)
	$(INSTALL) -m 644 $(PRODUCT).1 $(mandir)