summaryrefslogtreecommitdiff
path: root/package/vnc-reflector/patches/patch-Makefile
blob: 8a22ebd96919bc94b681cf31ecc3343391c7802b (plain)
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
--- vnc_reflector.orig/Makefile	2003-04-16 19:32:42.000000000 +0200
+++ vnc_reflector/Makefile	2011-01-20 14:16:58.854910770 +0100
@@ -14,10 +14,10 @@
 #
 # Variables you might want to edit: CFLAGS, CONFFLAGS
 
-IFLAGS =	-I.
+CPPFLAGS ?=	-I.
 
 # Production
-CFLAGS =	-O2 $(IFLAGS)
+CFLAGS ?=	-O2
 # Debug (strict)
 #CFLAGS =	-g -pedantic -Wall $(IFLAGS)
 # Debug (profiling)
@@ -26,10 +26,10 @@ CFLAGS =	-O2 $(IFLAGS)
 #CFLAGS =	-g $(IFLAGS)
 
 # Use poll(2) syscall in async I/O instead of select(2)
-CONFFLAGS =	-DUSE_POLL
+CPPFLAGS +=	-DUSE_POLL
 
 # Link with zlib and JPEG libraries
-LDFLAGS =	-L/usr/local/lib -lz -ljpeg
+LDFLAGS ?=	-L/usr/local/lib -lz -ljpeg
 
 PROG = 	vncreflector
 
@@ -43,14 +43,14 @@ SRCS =	main.c logging.c active.c actions
 	control.c encode_tight.c decode_hextile.c decode_tight.c fbs_files.c \
 	region_more.c
 
-CC = gcc
+CC ?= gcc
 MAKEDEPEND = makedepend
 MAKEDEPFLAGS = -Y
 
-default: $(PROG)
+all: $(PROG)
 
 $(PROG): $(OBJS)
-	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
+	$(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS)
 
 clean: 
 	rm -f $(OBJS) *core* ./*~ ./*.bak $(PROG)
@@ -59,7 +59,7 @@ depend: $(SRCS)
 	$(MAKEDEPEND) $(MAKEDEPFLAGS) -I. $(SRCS) 2> /dev/null
 
 .c.o:
-	$(CC) $(CFLAGS) $(CONFFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
 
 
 # DO NOT DELETE