aboutsummaryrefslogtreecommitdiff
path: root/x11/xmx/files/patch-aa
blob: e9bee16fd78952a1a8b1d6984649b74cd0863557 (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
--- Makefile.orig	Wed Apr 13 09:22:21 1994
+++ Makefile	Mon Jun 28 15:57:11 1999
@@ -1,70 +1,52 @@
-#
-#	Makefile for xmx
-#
-OPTFG=	-O
-DBGFG=	-g -DDEBUG -DMALLOC_DEBUG
-CFLAGS= -g
-
-LIB=
-
-XMX=	xmx
-OFILES=\
-	bufio.o\
-	connect.o\
-	error.o\
-	genreq.o\
-	main.o\
-	map.o\
-	pointer.o\
-	reply.o\
-	request.o\
-	resource.o\
-	socket.o
-
-CFILES= `echo $(OFILES) | sed 's/\.o/.c/g'`
-DEBUGLIB= /usr/lib/debug/malloc.o /usr/lib/debug/mallocmap.o $(LIB)
-
-$(XMX):	$(OFILES)
-	cc $(CFLAGS) -o $(XMX) $(OFILES) $(LIB)
+LIBPATH		= -L${X11BASE}/lib 
+INCPATH		= -I${X11BASE}/include
 
-debug:
-	make xmxd CFLAGS="$(DBGFG)" LIB="$(DEBUGLIB)"
-
-opt:
-	make xmx CFLAGS="$(OPTFG)"
-
-lint:
-	lint -hz $(CFILES)
+BIN		= ${PREFIX}/bin
+MANPATH		= ${PREFIX}/man
+LIB		= -lX11 -lm  
+OBJ		= bufio.o connect.o error.o genreq.o main.o map.o \
+		pointer.o reply.o request.o resource.o socket.o
+
+TARGET_FILE	= xmx
+
+#	-02	= enable all optimazions 
+#	-s	= make output smaller (without debug/link-informations)
+OPTION		= ${CFLAGS}
+
+# if yu dont have "gcc" use instead of "gcc" "cc"   
+CC		?= gcc
+
+all: $(TARGET_FILE)
+
+$(TARGET_FILE): $(OBJ)
+	$(CC) $(OPTION) -o $(TARGET_FILE)  $(OBJ)  $(LIBPATH) $(INCPATH) $(LIB)
+bufio.o: bufio.c
+	$(CC) $(OPTION) -c bufio.c	$(LIBPATH) $(INCPATH)
+connect.o: connect.c
+	$(CC) $(OPTION) -c connect.c	$(LIBPATH) $(INCPATH) 
+error.o: error.c
+	$(CC) $(OPTION) -c error.c	$(LIBPATH) $(INCPATH) 
+genreq.o: genreq.c
+	$(CC) $(OPTION) -c genreq.c	$(LIBPATH) $(INCPATH) 
+main.o: main.c
+	$(CC) $(OPTION) -c main.c	$(LIBPATH) $(INCPATH) 
+map.o: map.c
+	$(CC) $(OPTION) -c map.c	$(LIBPATH) $(INCPATH) 
+pointer.o: pointer.c
+	$(CC) $(OPTION) -c pointer.c	$(LIBPATH) $(INCPATH) 
+reply.o: reply.c
+	$(CC) $(OPTION) -c reply.c	$(LIBPATH) $(INCPATH) 
+request.o: request.c
+	$(CC) $(OPTION) -c request.c	$(LIBPATH) $(INCPATH) 
+resource.o: resource.c
+	$(CC) $(OPTION) -c resource.c	$(LIBPATH) $(INCPATH) 
+socket.o: socket.c
+	$(CC) $(OPTION) -c socket.c	$(LIBPATH) $(INCPATH) 
 
 clean:
-	rm -f *.o xmx xmxd core
-
-cs:
-	cp $(CFILES) xmx.h resource.h Makefile xmx.1 README doc/lab.me /cs/src/xmx
-
-howbig:
-	wc $(CFILES)
-
-src:
-	@echo $(CFILES) xmx.h resource.h
-
-listhost:	listhost.c
-	cc -g -o listhost listhost.c -lX
-
-testhash:	testhash.o hash.o error.o
-	cc -g -o testhash testhash.o hash.o error.o
-
-testsocket:	testsocket.o socket.o error.o
-	cc -g -o testsocket testsocket.o socket.o error.o
-
-xcoltest:	xcoltest.o
-	cc -g -o xcoltest xcoltest.o -lX11
-
-xcmaptest:	xcmaptest.o
-	cc -g -o xcmaptest xcmaptest.o -lX11
-
-onecol:	onecol.o
-	cc -g -o onecol onecol.o -lX11
+	rm -f *.o xmx xmxd *.core
 
-genreq.o resource.o: resource.h
-$(OFILES): xmx.h
+install: all
+	cp xmx $(BIN)
+	cp xmx.1 $(MANPATH)/man1
+	chmod 755 $(BIN)/xmx