1 | #
|
---|
2 | # rdesktop: A Remote Desktop Protocol client
|
---|
3 | # Makefile.in
|
---|
4 | # Copyright (C) Matthew Chapman 1999-2005
|
---|
5 | #
|
---|
6 |
|
---|
7 | prefix = @prefix@
|
---|
8 | exec_prefix = @exec_prefix@
|
---|
9 | bindir = @bindir@
|
---|
10 | mandir = @mandir@
|
---|
11 | datadir = @datadir@
|
---|
12 |
|
---|
13 | VERSION = @PACKAGE_VERSION@
|
---|
14 | KEYMAP_PATH = $(datadir)/rdesktop/keymaps/
|
---|
15 |
|
---|
16 | CC = @CC@
|
---|
17 | INSTALL = @INSTALL@
|
---|
18 | CFLAGS = @CFLAGS@ @X_CFLAGS@ @DEFS@ -DKEYMAP_PATH=\"$(KEYMAP_PATH)\" -DWITH_RDPUSB=1 -DRDESKTOP
|
---|
19 | LDFLAGS = @LDFLAGS@ @LIBS@ @X_LIBS@ @X_EXTRA_LIBS@
|
---|
20 | STRIP = @STRIP@
|
---|
21 |
|
---|
22 | TARGETS = rdesktop @RDP2VNCTARGET@
|
---|
23 | VNCINC = @VNCINC@
|
---|
24 | LDVNC = @LDVNC@
|
---|
25 | VNCLINK = @VNCLINK@
|
---|
26 | SOUNDOBJ = @SOUNDOBJ@
|
---|
27 |
|
---|
28 | RDPOBJ = tcp.o iso.o mcs.o secure.o licence.o rdp.o orders.o bitmap.o cache.o rdp5.o channels.o rdpdr.o serial.o printer.o disk.o parallel.o printercache.o mppc.o pstcache.o lspci.o seamless.o vrdp/rdpusb.o vrdp/USBProxyDevice-linux.o
|
---|
29 | X11OBJ = rdesktop.o xwin.o xkeymap.o ewmhints.o xclip.o cliprdr.o
|
---|
30 | VNCOBJ = vnc/rdp2vnc.o vnc/vnc.o vnc/xkeymap.o vnc/x11stubs.o
|
---|
31 |
|
---|
32 | .PHONY: all
|
---|
33 | all: $(TARGETS)
|
---|
34 |
|
---|
35 | rdesktop: $(X11OBJ) $(SOUNDOBJ) $(RDPOBJ)
|
---|
36 | $(CC) $(CFLAGS) -o rdesktop $(X11OBJ) $(SOUNDOBJ) $(RDPOBJ) $(LDFLAGS) -lX11
|
---|
37 |
|
---|
38 | rdp2vnc: $(VNCOBJ) $(SOUNDOBJ) $(RDPOBJ)
|
---|
39 | $(VNCLINK) $(CFLAGS) -o rdp2vnc $(VNCOBJ) $(SOUNDOBJ) $(RDPOBJ) $(LDFLAGS) $(LDVNC)
|
---|
40 |
|
---|
41 | vnc/rdp2vnc.o: rdesktop.c
|
---|
42 | $(CC) $(CFLAGS) $(VNCINC) -DRDP2VNC -o vnc/rdp2vnc.o -c rdesktop.c
|
---|
43 |
|
---|
44 | vnc/vnc.o: vnc/vnc.c
|
---|
45 | $(CC) $(CFLAGS) $(VNCINC) -DRDP2VNC -o vnc/vnc.o -c vnc/vnc.c
|
---|
46 |
|
---|
47 | vnc/xkeymap.o: xkeymap.c
|
---|
48 | $(CC) $(CFLAGS) $(VNCINC) -DRDP2VNC -o vnc/xkeymap.o -c xkeymap.c
|
---|
49 |
|
---|
50 | vnc/x11stubs.o: vnc/x11stubs.c
|
---|
51 | $(CC) $(CFLAGS) $(VNCINC) -o vnc/x11stubs.o -c vnc/x11stubs.c
|
---|
52 |
|
---|
53 | .PHONY: install
|
---|
54 | install: installbin installkeymaps installman
|
---|
55 |
|
---|
56 | .PHONY: installbin
|
---|
57 | installbin: rdesktop
|
---|
58 | mkdir -p $(DESTDIR)$(bindir)
|
---|
59 | $(INSTALL) rdesktop $(DESTDIR)$(bindir)
|
---|
60 | $(STRIP) $(DESTDIR)$(bindir)/rdesktop
|
---|
61 | chmod 755 $(DESTDIR)$(bindir)/rdesktop
|
---|
62 |
|
---|
63 | .PHONY: installman
|
---|
64 | installman: doc/rdesktop.1
|
---|
65 | mkdir -p $(DESTDIR)$(mandir)/man1
|
---|
66 | cp doc/rdesktop.1 $(DESTDIR)$(mandir)/man1
|
---|
67 | chmod 644 $(DESTDIR)$(mandir)/man1/rdesktop.1
|
---|
68 |
|
---|
69 | .PHONY: installkeymaps
|
---|
70 | installkeymaps:
|
---|
71 | mkdir -p $(DESTDIR)$(KEYMAP_PATH)
|
---|
72 | # Prevent copying the CVS directory
|
---|
73 | cp keymaps/?? keymaps/??-?? $(DESTDIR)$(KEYMAP_PATH)
|
---|
74 | cp keymaps/common $(DESTDIR)$(KEYMAP_PATH)
|
---|
75 | cp keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
|
---|
76 | chmod 644 $(DESTDIR)$(KEYMAP_PATH)/*
|
---|
77 |
|
---|
78 | .PHONY: proto
|
---|
79 | proto:
|
---|
80 | cat proto.head > proto.h
|
---|
81 | cproto -DMAKE_PROTO \
|
---|
82 | bitmap.c cache.c channels.c cliprdr.c disk.c mppc.c ewmhints.c \
|
---|
83 | iso.c licence.c mcs.c orders.c parallel.c printer.c printercache.c \
|
---|
84 | pstcache.c rdesktop.c rdp5.c rdp.c rdpdr.c rdpsnd.c rdpsnd_oss.c \
|
---|
85 | secure.c serial.c tcp.c xclip.c xkeymap.c xwin.c lspci.c seamless.c >> proto.h
|
---|
86 | cat proto.tail >> proto.h
|
---|
87 |
|
---|
88 | .PHONY: clean
|
---|
89 | clean:
|
---|
90 | rm -f *.o *~ vnc/*.o vnc/*~ rdesktop rdp2vnc
|
---|
91 |
|
---|
92 | .PHONY: distclean
|
---|
93 | distclean: clean
|
---|
94 | rm -rf autom4te.cache config.log config.status Makefile
|
---|
95 |
|
---|
96 | .PHONY: dist
|
---|
97 | dist: rdesktop-$(VERSION).tar.gz
|
---|
98 |
|
---|
99 | rdesktop-$(VERSION).tar.gz: Makefile configure
|
---|
100 | mkdir -p /tmp/rdesktop-make-dist-dir
|
---|
101 | ln -sf `pwd` /tmp/rdesktop-make-dist-dir/rdesktop-$(VERSION)
|
---|
102 | (cd /tmp/rdesktop-make-dist-dir; \
|
---|
103 | tar zcvf rdesktop-$(VERSION)/rdesktop-$(VERSION).tar.gz \
|
---|
104 | rdesktop-$(VERSION)/COPYING \
|
---|
105 | rdesktop-$(VERSION)/README \
|
---|
106 | rdesktop-$(VERSION)/configure \
|
---|
107 | rdesktop-$(VERSION)/configure.ac \
|
---|
108 | rdesktop-$(VERSION)/config.sub \
|
---|
109 | rdesktop-$(VERSION)/config.guess \
|
---|
110 | rdesktop-$(VERSION)/bootstrap \
|
---|
111 | rdesktop-$(VERSION)/install-sh \
|
---|
112 | rdesktop-$(VERSION)/Makefile.in \
|
---|
113 | rdesktop-$(VERSION)/rdesktop.spec \
|
---|
114 | rdesktop-$(VERSION)/*.c \
|
---|
115 | rdesktop-$(VERSION)/*.h \
|
---|
116 | rdesktop-$(VERSION)/proto.head \
|
---|
117 | rdesktop-$(VERSION)/proto.tail \
|
---|
118 | rdesktop-$(VERSION)/keymaps/?? \
|
---|
119 | rdesktop-$(VERSION)/keymaps/??-?? \
|
---|
120 | rdesktop-$(VERSION)/keymaps/common \
|
---|
121 | rdesktop-$(VERSION)/keymaps/modifiers \
|
---|
122 | rdesktop-$(VERSION)/keymaps/convert-map \
|
---|
123 | rdesktop-$(VERSION)/doc/HACKING \
|
---|
124 | rdesktop-$(VERSION)/doc/AUTHORS \
|
---|
125 | rdesktop-$(VERSION)/doc/TODO \
|
---|
126 | rdesktop-$(VERSION)/doc/ChangeLog \
|
---|
127 | rdesktop-$(VERSION)/doc/keymapping.txt \
|
---|
128 | rdesktop-$(VERSION)/doc/keymap-names.txt \
|
---|
129 | rdesktop-$(VERSION)/doc/ipv6.txt \
|
---|
130 | rdesktop-$(VERSION)/doc/licensing.txt \
|
---|
131 | rdesktop-$(VERSION)/doc/patches.txt \
|
---|
132 | rdesktop-$(VERSION)/doc/redirection.txt \
|
---|
133 | rdesktop-$(VERSION)/doc/rdesktop.1 )
|
---|
134 | rm -rf /tmp/rdesktop-make-dist-dir
|
---|
135 |
|
---|
136 | .PHONY: dist-noversion
|
---|
137 | dist-noversion: rdesktop.tar.gz
|
---|
138 |
|
---|
139 | rdesktop.tar.gz: rdesktop-$(VERSION).tar.gz
|
---|
140 | mkdir -p /tmp/rdesktop-make-dist-dir
|
---|
141 | tar zxvf $< -C /tmp/rdesktop-make-dist-dir
|
---|
142 | mv /tmp/rdesktop-make-dist-dir/rdesktop-$(VERSION) /tmp/rdesktop-make-dist-dir/rdesktop
|
---|
143 | ls /tmp/rdesktop-make-dist-dir/rdesktop
|
---|
144 | tar zcvf $@ -C /tmp/rdesktop-make-dist-dir rdesktop
|
---|
145 | rm -rf /tmp/rdesktop-make-dist-dir
|
---|
146 |
|
---|
147 | Makefile: Makefile.in configure
|
---|
148 | ./config.status
|
---|
149 |
|
---|
150 | configure: configure.ac
|
---|
151 | ./bootstrap
|
---|
152 |
|
---|
153 | .SUFFIXES:
|
---|
154 | .SUFFIXES: .c .o
|
---|
155 |
|
---|
156 | .c.o:
|
---|
157 | $(CC) $(CFLAGS) -o $@ -c $<
|
---|
158 |
|
---|