Tweak editors/scribes version 0.4.b954_1
[dports.git] / x11 / xmx / files / patch-aa
1 --- Makefile.orig       Wed Apr 13 09:22:21 1994
2 +++ Makefile    Mon Jun 28 15:57:11 1999
3 @@ -1,70 +1,52 @@
4 -#
5 -#      Makefile for xmx
6 -#
7 -OPTFG= -O
8 -DBGFG= -g -DDEBUG -DMALLOC_DEBUG
9 -CFLAGS= -g
10 -
11 -LIB=
12 -
13 -XMX=   xmx
14 -OFILES=\
15 -       bufio.o\
16 -       connect.o\
17 -       error.o\
18 -       genreq.o\
19 -       main.o\
20 -       map.o\
21 -       pointer.o\
22 -       reply.o\
23 -       request.o\
24 -       resource.o\
25 -       socket.o
26 -
27 -CFILES= `echo $(OFILES) | sed 's/\.o/.c/g'`
28 -DEBUGLIB= /usr/lib/debug/malloc.o /usr/lib/debug/mallocmap.o $(LIB)
29 -
30 -$(XMX):        $(OFILES)
31 -       cc $(CFLAGS) -o $(XMX) $(OFILES) $(LIB)
32 +LIBPATH                = -L${LOCALBASE}/lib 
33 +INCPATH                = -I${LOCALBASE}/include
34  
35 -debug:
36 -       make xmxd CFLAGS="$(DBGFG)" LIB="$(DEBUGLIB)"
37 -
38 -opt:
39 -       make xmx CFLAGS="$(OPTFG)"
40 -
41 -lint:
42 -       lint -hz $(CFILES)
43 +BIN            = ${PREFIX}/bin
44 +MANPATH                = ${PREFIX}/man
45 +LIB            = -lX11 -lm  
46 +OBJ            = bufio.o connect.o error.o genreq.o main.o map.o \
47 +               pointer.o reply.o request.o resource.o socket.o
48 +
49 +TARGET_FILE    = xmx
50 +
51 +#      -02     = enable all optimazions 
52 +#      -s      = make output smaller (without debug/link-informations)
53 +OPTION         = ${CFLAGS}
54 +
55 +# if yu dont have "gcc" use instead of "gcc" "cc"   
56 +CC             ?= gcc
57 +
58 +all: $(TARGET_FILE)
59 +
60 +$(TARGET_FILE): $(OBJ)
61 +       $(CC) $(OPTION) -o $(TARGET_FILE)  $(OBJ)  $(LIBPATH) $(INCPATH) $(LIB)
62 +bufio.o: bufio.c
63 +       $(CC) $(OPTION) -c bufio.c      $(LIBPATH) $(INCPATH)
64 +connect.o: connect.c
65 +       $(CC) $(OPTION) -c connect.c    $(LIBPATH) $(INCPATH) 
66 +error.o: error.c
67 +       $(CC) $(OPTION) -c error.c      $(LIBPATH) $(INCPATH) 
68 +genreq.o: genreq.c
69 +       $(CC) $(OPTION) -c genreq.c     $(LIBPATH) $(INCPATH) 
70 +main.o: main.c
71 +       $(CC) $(OPTION) -c main.c       $(LIBPATH) $(INCPATH) 
72 +map.o: map.c
73 +       $(CC) $(OPTION) -c map.c        $(LIBPATH) $(INCPATH) 
74 +pointer.o: pointer.c
75 +       $(CC) $(OPTION) -c pointer.c    $(LIBPATH) $(INCPATH) 
76 +reply.o: reply.c
77 +       $(CC) $(OPTION) -c reply.c      $(LIBPATH) $(INCPATH) 
78 +request.o: request.c
79 +       $(CC) $(OPTION) -c request.c    $(LIBPATH) $(INCPATH) 
80 +resource.o: resource.c
81 +       $(CC) $(OPTION) -c resource.c   $(LIBPATH) $(INCPATH) 
82 +socket.o: socket.c
83 +       $(CC) $(OPTION) -c socket.c     $(LIBPATH) $(INCPATH) 
84  
85  clean:
86 -       rm -f *.o xmx xmxd core
87 -
88 -cs:
89 -       cp $(CFILES) xmx.h resource.h Makefile xmx.1 README doc/lab.me /cs/src/xmx
90 -
91 -howbig:
92 -       wc $(CFILES)
93 -
94 -src:
95 -       @echo $(CFILES) xmx.h resource.h
96 -
97 -listhost:      listhost.c
98 -       cc -g -o listhost listhost.c -lX
99 -
100 -testhash:      testhash.o hash.o error.o
101 -       cc -g -o testhash testhash.o hash.o error.o
102 -
103 -testsocket:    testsocket.o socket.o error.o
104 -       cc -g -o testsocket testsocket.o socket.o error.o
105 -
106 -xcoltest:      xcoltest.o
107 -       cc -g -o xcoltest xcoltest.o -lX11
108 -
109 -xcmaptest:     xcmaptest.o
110 -       cc -g -o xcmaptest xcmaptest.o -lX11
111 -
112 -onecol:        onecol.o
113 -       cc -g -o onecol onecol.o -lX11
114 +       rm -f *.o xmx xmxd *.core
115  
116 -genreq.o resource.o: resource.h
117 -$(OFILES): xmx.h
118 +install: all
119 +       cp xmx $(BIN)
120 +       cp xmx.1 $(MANPATH)/man1
121 +       chmod 755 $(BIN)/xmx