aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Serpell <daniel.serpell@gmail.com>2020-06-03 23:20:22 -0400
committerDaniel Serpell <daniel.serpell@gmail.com>2020-06-03 23:20:22 -0400
commitf9599d347aab07d9281400ec8b214aabd187fbcd (patch)
tree5d688d131452b67824f2dc821c4f16419bbffdb4
parent8d0f9ca94502e0f89f8f07f9cce886f6d439834f (diff)
downloademu2-f9599d347aab07d9281400ec8b214aabd187fbcd.tar.gz
Use DESTDIR on install rule and create destination directories.
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 2439a77..80dd6ec 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
CC=gcc
CFLAGS=-O3 -flto -Wall -g -Werror=implicit-function-declaration -Werror=int-conversion
LDLIBS=-lm
-INSTALL=install -c
+INSTALL=install
PREFIX=/usr
OBJS=\
@@ -34,11 +34,12 @@ clean:
rm -f emu2
rmdir obj
-install:
- ${INSTALL} emu2 ${PREFIX}/bin
+install: emu2
+ $(INSTALL) -d $(DESTDIR)${PREFIX}/bin
+ $(INSTALL) -s emu2 $(DESTDIR)${PREFIX}/bin
-uninstall:
- rm -f ${PREFIX}/bin/emu2
+uninstall:
+ rm -f $(DESTDIR)${PREFIX}/bin/emu2
# Generated with gcc -MM src/*.c
obj/codepage.o: src/codepage.c src/codepage.h src/dbg.h src/env.h
Un proyecto texto-plano.xyz