patch-Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --- vnc_reflector.orig/Makefile 2003-04-16 19:32:42.000000000 +0200
  2. +++ vnc_reflector/Makefile 2011-01-20 14:16:58.854910770 +0100
  3. @@ -14,10 +14,10 @@
  4. #
  5. # Variables you might want to edit: CFLAGS, CONFFLAGS
  6. -IFLAGS = -I.
  7. +CPPFLAGS ?= -I.
  8. # Production
  9. -CFLAGS = -O2 $(IFLAGS)
  10. +CFLAGS ?= -O2
  11. # Debug (strict)
  12. #CFLAGS = -g -pedantic -Wall $(IFLAGS)
  13. # Debug (profiling)
  14. @@ -26,10 +26,10 @@ CFLAGS = -O2 $(IFLAGS)
  15. #CFLAGS = -g $(IFLAGS)
  16. # Use poll(2) syscall in async I/O instead of select(2)
  17. -CONFFLAGS = -DUSE_POLL
  18. +CPPFLAGS += -DUSE_POLL
  19. # Link with zlib and JPEG libraries
  20. -LDFLAGS = -L/usr/local/lib -lz -ljpeg
  21. +LDFLAGS ?= -L/usr/local/lib -lz -ljpeg
  22. PROG = vncreflector
  23. @@ -43,14 +43,14 @@ SRCS = main.c logging.c active.c actions
  24. control.c encode_tight.c decode_hextile.c decode_tight.c fbs_files.c \
  25. region_more.c
  26. -CC = gcc
  27. +CC ?= gcc
  28. MAKEDEPEND = makedepend
  29. MAKEDEPFLAGS = -Y
  30. -default: $(PROG)
  31. +all: $(PROG)
  32. $(PROG): $(OBJS)
  33. - $(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
  34. + $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS)
  35. clean:
  36. rm -f $(OBJS) *core* ./*~ ./*.bak $(PROG)
  37. @@ -59,7 +59,7 @@ depend: $(SRCS)
  38. $(MAKEDEPEND) $(MAKEDEPFLAGS) -I. $(SRCS) 2> /dev/null
  39. .c.o:
  40. - $(CC) $(CFLAGS) $(CONFFLAGS) -c $<
  41. + $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
  42. # DO NOT DELETE