File: Makefile

package info (click to toggle)
gman 0.9.3-5.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 652 kB
  • sloc: ansic: 7,389; makefile: 131; perl: 105
file content (39 lines) | stat: -rw-r--r-- 1,173 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
# Gman Makefile
# You can adjust the following variables.

CXX = g++
CXXFLAGS = -DVERSION=\"0.9.3\" $(shell pkg-config --cflags gtk+-2.0) -O2 -Wall $(DEBUG)
CC = $(CXX) $(CXXFLAGS)

prefix ?= /usr
cgi_bin_prefix = ${prefix}/lib/cgi-bin

# There shouldn't be any need to edit anything below this point.
all: gman

objectfiles = menu.o mandata.o util.o gman.o list.o context.o task.o \
              taskfunc.o window2.o

GTK_LIBS = $(shell pkg-config --libs gtk+-2.0)

gman: $(objectfiles)
	$(CC) -rdynamic $(objectfiles) -o gman -lpthread $(GTK_LIBS)

%.o: %.c %.h
gman.o: gman.c gman.h menu.h
menu.o: menu.c menu.h mandata.h util.h
mandata.o: mandata.c mandata.h util.h mandatadef.h

clean: 
	rm -f $(objectfiles) gman

distclean: clean
	rm -f *.o *~

install:
	test -d $(DESTDIR)/$(prefix)/bin || mkdir -p $(DESTDIR)/$(prefix)/bin
	test -d $(DESTDIR)/$(prefix)/share/man/man1 || mkdir -p $(DESTDIR)/$(prefix)/share/man/man1
	test -d $(DESTDIR)/$(cgi_bin_prefix) || mkdir -p $(DESTDIR)/$(cgi_bin_prefix)
	install -m 755 gman $(DESTDIR)/$(prefix)/bin/
	install -m 755 gman.pl $(DESTDIR)/$(cgi_bin_prefix)/gman.pl
	install -m 644 gman.1x $(DESTDIR)/$(prefix)/share/man/man1