From: Michael D. Lowis Date: Wed, 30 Nov 2016 01:08:44 +0000 (-0500) Subject: Added install and uninstall tasks to makefile default PREFIX of $HOME X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=282a754d8594c573f365bf21d0480d2efb40b423;p=projs%2Ftide.git Added install and uninstall tasks to makefile default PREFIX of $HOME --- diff --git a/Makefile b/Makefile index 12b1afb..a49c3ee 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,17 @@ all: xedit xpick clean: $(RM) *.o lib*/*.o test/*.o *.a xpick xedit unittests +install: all + mkdir -p $(PREFIX)/bin + cp xedit $(PREFIX)/bin + cp xpick $(PREFIX)/bin + cp xfilepick $(PREFIX)/bin + +uninstall: all + rm -f $(PREFIX)/bin/xedit + rm -f $(PREFIX)/bin/xpick + rm -f $(PREFIX)/bin/xfilepick + test: unittests ./unittests diff --git a/config.mk b/config.mk index 4dac5a5..33775f1 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,8 @@ # Customize this file to fit your system +# Install location +PREFIX = $(HOME) + # Compiler Setup CC = c99 CFLAGS = -g -O0 $(INCS) diff --git a/xedit.c b/xedit.c index 31afa7d..5cd3c38 100644 --- a/xedit.c +++ b/xedit.c @@ -170,8 +170,8 @@ static char* CopyCmd[] = { "xsel", "-bi", NULL }; static char* PasteCmd[] = { "xsel", "-bo", NULL }; #endif static char* ShellCmd[] = { "/bin/sh", "-c", NULL, NULL }; -static char* PickFileCmd[] = { "./xfilepick", ".", NULL }; -static char* OpenCmd[] = { "./xedit", NULL, NULL }; +static char* PickFileCmd[] = { "xfilepick", ".", NULL }; +static char* OpenCmd[] = { "xedit", NULL, NULL }; /* Main Routine *****************************************************************************/