Add flexibility to 'make install'

Easier to install in alternate places, without the extra 'usr/' in paths.
Default is still /usr, but setting DESTDIR=/usr/local should work.

Also replace hard-coded directory with variable.
This commit is contained in:
George Baltz N3GB 2023-10-15 11:29:34 -04:00
parent ba558da22e
commit 9c771b6777
2 changed files with 10 additions and 6 deletions

View File

@ -5,6 +5,7 @@ Legend:
--------------------
2.6.0 (2022-05-29)
#some code refactoring
#Easier to install into /usr/local or ~/.local (N3GB)
+ new button "URL" to row below "Comment to callsign" (Saku, OH1KH)
+ many improvements to working with WSJTX (Saku, OH1KH)
+ Clear RIT after saving QSO cleats also XIT (Saku, OH1KH)

View File

@ -1,8 +1,12 @@
CC=lazbuild
ST=strip
datadir = $(DESTDIR)/usr/share/cqrlog
bindir = $(DESTDIR)/usr/bin
sharedir = $(DESTDIR)/usr/share
# Set default path header for installation. Can be changed by
# environment variable or CLI
DESTDIR = /usr
#
datadir = $(DESTDIR)/share/cqrlog
bindir = $(DESTDIR)/bin
sharedir = $(DESTDIR)/share
tmpdir = /tmp
cqrlog: src/cqrlog.lpi
@ -18,8 +22,8 @@ clean:
rm -rf src/backup
rm -f -v src/richmemo/*.o src/richmemo/*.ppu src/richmemo/gtk2/*.ppu src/richmemo/gtk2/*.o
rm -f -v tools/adif_hash_generator tools/adif_hash_generator.lpi tools/adif_hash_generator.lps
rm -rf /tmp/.lazarus
rm -rf $(tmpdir)/.lazarus
install:
install -d -v $(bindir)
install -d -v $(datadir)
@ -82,4 +86,3 @@ cqrlog_qt5: src/cqrlog.lpi
cqrlog_qt5_debug: src/cqrlog.lpi
$(CC) --ws=qt5 --pcp=$(tmpdir)/.lazarus src/cqrlog.lpi
gzip tools/cqrlog.1 -c > tools/cqrlog.1.gz