File: Makefile

package info (click to toggle)
qmenu 5.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 212 kB
  • ctags: 238
  • sloc: ansic: 3,288; makefile: 38
file content (47 lines) | stat: -rwxr-xr-x 1,175 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
#
# This Makefile is part of qmenu, and is Copyright © 2014 Andrea Colangelo.
#
# This file is free software, and is released under the terms of the WTFPL, as
# described here: http://www.wtfpl.net/txt/copying/

SHELL = /bin/bash

RELEASE = 5.0.2

CC = gcc
CFLAGS = -g -Wall
LIBS = -lncurses

TARGET = qmenu

PREFIX = /usr/local
BINDIR= $(PREFIX)/bin
DATAROOTDIR = $(PREFIX)/share
DATADIR = $(DATAROOTDIR)/$(TARGET)
MANDIR = $(DATAROOTDIR)/man/man1

build:
	$(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c $(LIBS)

install:
	install -d -m 0755 $(BINDIR)
	install -d -m 0755 $(DATADIR)
	install -d -m 0755 $(MANDIR)
	install -m 0755 $(TARGET) $(BINDIR)/
	install -m 0644 *.mnu $(DATADIR)
	install -m 0644 $(TARGET).1  $(MANDIR)

clean:
	$(RM) $(TARGET)
	$(RM) -rf .release-tmp

release: clean
	mkdir -p .release-tmp/$(TARGET)-$(RELEASE)/
	cp -rv * .release-tmp/$(TARGET)-$(RELEASE)
	rm -rf .release-tmp/$(TARGET)-$(RELEASE)/debian
	rm -f .release-tmp/$(TARGET)-$(RELEASE)/qmenu.{cfg,frm,gif,hlp}
	rm -f .release-tmp/$(TARGET)-$(RELEASE)/README_it.md
	tar czf $(TARGET)-$(RELEASE).tar.gz -C .release-tmp $(TARGET)-$(RELEASE)
	rm -rf .release-tmp

.PHONY: build install clean release