summaryrefslogtreecommitdiff
blob: 26c4f7b91308b579f044bf55d7fbad851e12f25c (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 elfsh-0.51b3.orig/Makefile elfsh-0.51b3/Makefile
--- elfsh-0.51b3.orig/Makefile	2004-09-20 22:20:22.152723392 -0400
+++ elfsh-0.51b3/Makefile	2004-09-20 22:21:37.270303784 -0400
@@ -5,12 +5,14 @@
 ## Last update Sun May 25 18:12:43 2003 mayhem
 ##
 
+DESTDIR = /
+PREFIX  = $(DESTDIR)/usr
 RM	= rm -f
 ETAGS   = etags
-MODPATH = /usr/share/elfsh/
-BINPATH = /usr/bin
-LIBPATH = /usr/lib/
-INCPATH = /usr/include/
+BINPATH = $(PREFIX)/bin
+LIBPATH = $(PREFIX)/lib
+INCPATH = $(PREFIX)/include
+MODPATH = $(LIBPATH)/elfsh
 
 all	:
 	@echo 'Builting libelfsh...'
@@ -32,14 +34,15 @@
 	#$(MAKE) -s tags
 
 install	: mod_install
+	@mkdir -p $(BINPATH) $(LIBPATH) $(INCPATH)
 	@cp vm/elfsh $(BINPATH)/
 	@cp libelfsh/libelfsh.a libelfsh/libelfsh.so $(LIBPATH)
 	@cp libelfsh/include/libelfsh*.h $(INCPATH)
-	@chmod 755 $(BINPATH)/elfsh $(LIBPATH)libelfsh.so $(LIBPATH)libelfsh.a $(INCPATH)libelfsh*.h
+	@chmod 755 $(BINPATH)/elfsh $(LIBPATH)/libelfsh.so
 	@echo 'ELFsh and Libelfsh installed successfully .'
 
 mod_install:
-	@mkdir $(MODPATH) 2>/dev/null || true
+	@mkdir -p $(MODPATH)
 	@cp modules/*.so $(MODPATH)
 	@chmod -R 755 $(MODPATH)
 
diff -ur elfsh-0.51b3.orig/vm/Makefile elfsh-0.51b3/vm/Makefile
--- elfsh-0.51b3.orig/vm/Makefile	2004-09-20 22:20:22.117728712 -0400
+++ elfsh-0.51b3/vm/Makefile	2004-09-20 22:22:17.807141248 -0400
@@ -13,6 +13,7 @@
 #DLOPT_linux-gnu	= -ldl
 #DLOPT_solaris		= -ldl
 #EXTRAOPT		= -lefence
+EXTRAOPT = -ldl
 
 # Uncomment that to use libasm
 #ASMOPT			= -DUSE_LIBASM
diff -ur elfsh-0.51b3.orig/vm/include/elfsh.h elfsh-0.51b3/vm/include/elfsh.h
--- elfsh-0.51b3.orig/vm/include/elfsh.h	2004-09-20 22:20:22.116728864 -0400
+++ elfsh-0.51b3/vm/include/elfsh.h	2004-09-20 22:20:22.358692080 -0400
@@ -94,7 +94,7 @@
 #define	ELFSH_SHELL		"/bin/bash"
 #define	ELFSH_INIT		"elfsh_init"
 #define	ELFSH_FINI		"elfsh_fini"
-#define	ELFSH_MODPATH		"/usr/share/elfsh/"
+#define	ELFSH_MODPATH		"/usr/lib/elfsh/"
 
 /* For elfsh/elfsh/disasm.c:display_object() */
 #define	ELFSH_HEXA_VIEW		0