patch-Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. $OpenBSD: patch-Makefile,v 1.1.1.1 2007/11/20 21:08:56 jasper Exp $
  2. --- Makefile.orig Tue Oct 18 02:41:01 2005
  3. +++ Makefile Mon Nov 12 19:40:55 2007
  4. @@ -10,13 +10,11 @@
  5. # debugging
  6. # DFLAGS = -DTEST -DDEBUG
  7. DFLAGS = -DGAPING_SECURITY_HOLE
  8. -CFLAGS = -O
  9. XFLAGS = # xtra cflags, set by systype targets
  10. XLIBS = # xtra libs if necessary?
  11. # -Bstatic for sunos, -static for gcc, etc. You want this, trust me.
  12. STATIC =
  13. -CC = cc $(CFLAGS)
  14. -LD = $(CC) -s # linker; defaults to stripped executables
  15. +LD = $(CXX) # linker
  16. o = o # object extension
  17. ALL = cryptcat
  18. @@ -28,9 +26,12 @@ bogus:
  19. ### HARD TARGETS
  20. -cryptcat: netcat.c farm9crypt.o twofish2.o
  21. - $(LD) $(DFLAGS) $(XFLAGS) $(STATIC) -o cryptcat netcat.c farm9crypt.o twofish2.o $(XLIBS)
  22. +netcat.o:
  23. + $(CC) $(CFLAGS) -c netcat.c
  24. +cryptcat: netcat.o farm9crypt.o twofish2.o
  25. + $(LD) $(CFLAGS) $(DFLAGS) $(XFLAGS) $(STATIC) -o cryptcat netcat.o farm9crypt.o twofish2.o $(XLIBS)
  26. +
  27. nc-dos:
  28. @echo "DOS?! Maybe someday, but not now"
  29. @@ -92,8 +93,11 @@ bsdi:
  30. netbsd:
  31. make -e $(ALL) $(MFLAGS) XFLAGS='-DNETBSD' STATIC=-static \
  32. XLIBS='-lstdc++'
  33. +
  34. openbsd:
  35. - @echo "use: make netbsd"
  36. + ${MAKE} -e $(ALL) $(MFLAGS) XFLAGS='-DNETBSD' STATIC=-static \
  37. + XLIBS='-lstdc++'
  38. +
  39. # finally got to an hpux box, which turns out to be *really* warped.
  40. # STATIC here means "linker subprocess gets args '-a archive'" which causes
  41. # /lib/libc.a to be searched ahead of '-a shared', or /lib/libc.sl.
  42. @@ -115,10 +119,10 @@ next:
  43. make -e $(ALL) $(MFLAGS) XFLAGS='-DNEXT' STATIC=-Bstatic
  44. farm9crypt.o: farm9crypt.cc farm9crypt.h
  45. - ${CC} -c farm9crypt.cc
  46. + ${CC} ${CFLAGS} -c farm9crypt.cc
  47. twofish2.o: twofish2.cc twofish2.h
  48. - ${CC} -c twofish2.cc
  49. + ${CC} ${CFLAGS} -c twofish2.cc
  50. # start with this for a new architecture, and see what breaks.
  51. generic: