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