]> git.mdlowis.com Git - projs/tide.git/commitdiff
Added install and uninstall tasks to makefile default PREFIX of $HOME
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 30 Nov 2016 01:08:44 +0000 (20:08 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 30 Nov 2016 01:08:44 +0000 (20:08 -0500)
Makefile
config.mk
xedit.c

index 12b1afb72b8ccb4ce1a9e7c3bb1e5998e9804eeb..a49c3ee602f9b6b0db9ce2954c1b17aebd4156c9 100644 (file)
--- 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
 
index 4dac5a50c115e2f12c66542484d1a3afd1d9fe47..33775f139c8a7fad53a1cc2df0e4bb512a4d9b0c 100644 (file)
--- 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 31afa7d773425c00af4c9e38214e16cc6fc4b084..5cd3c38a2dedb0f762dfc7cb8221a93b49f03be1 100644 (file)
--- 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
  *****************************************************************************/