aboutsummaryrefslogtreecommitdiff
path: root/misc/langdrill/050_install.diff
blob: 2af54f7851101434261ca3bdf3032115d5d34c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff -ur langdrill-0.3/src/Makefile langdrill-0.3/src/Makefile
--- langdrill-0.3/src/Makefile	2018-03-19 09:36:36.277390675 -0700
+++ langdrill-0.3/src/Makefile	2018-03-19 09:55:06.065284069 -0700
@@ -1,6 +1,5 @@
 ###### Files & Directories
 DESTDIR=
-MY_DEBIAN_SYSTEM=
 
 
 SRC = 	main.cc\
@@ -20,21 +19,10 @@
 	`vdk-config-2 --cflags` \
 	-Wall
 
-###### Test for Debian GNU/Linux
-# If your system is not Debian GNU/Linux please modify the values after
-# "else" statement. Modifying the values before else is useless, unless
-# you also set MY_DEBIAN_SYSTEM=1
-ifeq ($(MY_DEBIAN_SYSTEM),1)
-	MY_MESSAGE_OF_THE_DAY=">>" $(TARGET) compilled for Debian GNU/Linux system. "<<"
-	DRILL_DIR=$(DESTDIR)/usr/share/langdrill
-	BIN_DIR=$(DESTDIR)/usr/bin
-	MAN_DIR=$(DESTDIR)/usr/share/man/man1
-else
-	MY_MESSAGE_OF_THE_DAY=">>" $(TARGET) compilled for NON-Debian GNU/Linux system. "<<"
-	DRILL_DIR=$(DESTDIR)/usr/local/share/langdrill
-	BIN_DIR=$(DESTDIR)/usr/local/bin
-	MAN_DIR=$(DESTDIR)/usr/local/man/man1
-endif
+PREFIX ?= /usr/local
+DRILL_DIR ?= $(PREFIX)/share/langdrill
+BIN_DIR ?= $(PREFIX)/bin
+MAN_DIR ?= $(PREFIX)/share/man
 
 CC = g++
 CFLAGS = -g
@@ -62,21 +50,18 @@
 	rm -f $(TARGET) core *~
 
 $(TARGET): tarclean $(OBJ)
-	@echo $(MY_MESSAGE_OF_THE_DAY)
 	$(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
 
 run:	tarclean $(OBJ)
-	@echo $(MY_MESSAGE_OF_THE_DAY)
 	$(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
 	./$(TARGET)
 
 build: clean tarclean $(OBJ)
-	@echo $(MY_MESSAGE_OF_THE_DAY)
 	$(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
 
 install: all
-	install -d $(BIN_DIR) $(DRILL_DIR) $(MAN_DIR)
-	install ./$(TARGET) $(BIN_DIR)
-	install -m644 $(DRILL_SUP) $(DRILL_DIR)
-	ln -sf japanese.drill $(DRILL_DIR)/$(DRILL_DEF)
-	install -m644 $(MAN_PAGE) $(MAN_DIR)
+	install -d $(DESTDIR)$(BIN_DIR) $(DESTDIR)$(DRILL_DIR) $(DESTDIR)$(MAN_DIR)/man1
+	install ./$(TARGET) $(DESTDIR)$(BIN_DIR)
+	install -m644 $(DRILL_SUP) $(DESTDIR)$(DRILL_DIR)
+	ln -sf japanese.drill $(DESTDIR)$(DRILL_DIR)/$(DRILL_DEF)
+	install -m644 $(MAN_PAGE) $(DESTDIR)$(MAN_DIR)/man1