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