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
|
# Gman Makefile
# You can adjust the following variables.
CXX = g++
CXXFLAGS = -DVERSION=\"0.9.3\" $(shell gtk-config --cflags) -O2 -Wall
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
gman: $(objectfiles)
$(CC) -lgtk -lgdk -lpthread $(shell gtk-config --libs) $(objectfiles) -o gman
%.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 $(prefix)/bin || mkdir -p $(prefix)/bin
test -d $(prefix)/share/man/man1 || mkdir -p $(prefix)/share/man/man1
test -d $(cgi_bin_prefix) || mkdir -p $(cgi_bin_prefix)
install -s -m 755 gman $(prefix)/bin/
install -m 755 gman.pl $(cgi_bin_prefix)/gman.pl
install -m 644 gman.1x $(prefix)/share/man/man1
|