diff options
author | GDR! <gdr@gdr.name> | 2020-08-15 07:10:30 +0000 |
---|---|---|
committer | GDR! <gdr@gdr.name> | 2020-08-15 07:10:30 +0000 |
commit | d4e40c9ce6bdf8b486a69d1b497695f87c80c1ad (patch) | |
tree | 73e6279cc1260e5265e9ac5440d048539e090882 /Makefile | |
parent | 9e8083355dd467f0d1f93811563aa773d8044566 (diff) |
Deb building works
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -10,10 +10,14 @@ DSO_LDFLAGS += $(shell pkg-config --libs $(DEPS)) | |||
10 | OBJECTS=$(SOURCES:.c=.o) | 10 | OBJECTS=$(SOURCES:.c=.o) |
11 | INCLUDES = $(wildcard *.h) | 11 | INCLUDES = $(wildcard *.h) |
12 | PYTHON = /usr/bin/env python3 | 12 | PYTHON = /usr/bin/env python3 |
13 | INSTALL = install -C | ||
14 | INSTALL_MKDIR = $(INSTALL) -d -m 755 | ||
13 | 15 | ||
16 | prefix ?= /usr | ||
17 | bindir ?= $(prefix)/bin | ||
14 | 18 | ||
15 | # Targets | 19 | # Targets |
16 | all: tuntox | 20 | all: tuntox tuntox_nostatic |
17 | 21 | ||
18 | gitversion.h: FORCE | 22 | gitversion.h: FORCE |
19 | @if [ -f .git/HEAD ] ; then echo " GEN $@"; echo "#define GITVERSION \"$(shell git rev-parse HEAD)\"" > $@; fi | 23 | @if [ -f .git/HEAD ] ; then echo " GEN $@"; echo "#define GITVERSION \"$(shell git rev-parse HEAD)\"" > $@; fi |
@@ -41,6 +45,7 @@ clean: | |||
41 | rm -f *.o tuntox cscope.out gitversion.h tox_bootstrap.h | 45 | rm -f *.o tuntox cscope.out gitversion.h tox_bootstrap.h |
42 | 46 | ||
43 | install: tuntox_nostatic | 47 | install: tuntox_nostatic |
44 | cp tuntox_nostatic $(DESTDIR)/bin/tuntox | 48 | $(INSTALL_MKDIR) -d $(DESTDIR)$(bindir) |
49 | cp tuntox_nostatic $(DESTDIR)$(bindir)/tuntox | ||
45 | 50 | ||
46 | .PHONY: all clean tuntox | 51 | .PHONY: all clean tuntox |