File: Makefile

package info (click to toggle)
setop 0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, stretch, trixie
  • size: 104 kB
  • ctags: 34
  • sloc: cpp: 425; makefile: 22
file content (34 lines) | stat: -rw-r--r-- 740 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
PROGNAME := setop

.PHONY: all, clean

CXXFLAGS += -std=c++11 -O3
LIBS += -lboost_program_options -lboost_regex
SOURCES = src/main.cpp

# where to put executable and manpage on 'make install'
BIN ?= $(DESTDIR)/usr/bin
HELP ?= $(DESTDIR)/usr/share/man/man1


all: $(PROGNAME) man

$(PROGNAME): $(SOURCES)
	$(CXX) $(CXXFLAGS) $(SOURCES) $(LDFLAGS) $(LIBS) -o $(PROGNAME)

clean:
	@echo "Clean."
	-rm -f $(PROGNAME)
	-rm -f $(PROGNAME).1

install: $(PROGNAME) man
	install -d $(BIN) $(HELP)
	install $(PROGNAME) $(BIN)
	install $(PROGNAME).1 $(HELP)

man: $(PROGNAME)
	help2man -n "make set of strings from input" -N -L en_US.UTF-8 ./$(PROGNAME) | gzip > $(PROGNAME).1

# not needed:
#documentation: $(SOURCES) doxyconfig
#	doxygen doxyconfig