Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #
  2. # a very simple Makefile for miniLZO
  3. #
  4. # Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
  5. #
  6. PROGRAM = testmini
  7. SOURCES = testmini.c minilzo.c
  8. default:
  9. @echo ""
  10. @echo "Welcome to miniLZO. Please choose one of the following 'make' targets:"
  11. @echo ""
  12. @echo " gcc: gcc"
  13. @echo " unix: hpux hpux9"
  14. @echo " win32: win32-bc win32-cygwin win32-dm win32-lccwin32"
  15. @echo " win32-intelc win32-mingw win32-vc win32-watcomc"
  16. @echo " dos32: dos32-djgpp2 dos32-wc"
  17. @echo ""
  18. # Make sure that minilzo.h, lzoconf.h and lzodefs.h are in the
  19. # current dircectory. Otherwise you may want to adjust CPPFLAGS.
  20. CPPFLAGS = -I. -I../include/lzo
  21. GCC_CFLAGS = -s -Wall -O2 -fomit-frame-pointer
  22. #
  23. # gcc (generic)
  24. #
  25. gcc:
  26. gcc $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM) $(SOURCES)
  27. cc:
  28. cc $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
  29. #
  30. # UNIX
  31. #
  32. hpux:
  33. cc -Ae $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
  34. hpux9:
  35. cc -Aa -D_HPUX_SOURCE $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
  36. #
  37. # Windows (32-bit)
  38. #
  39. win32-borlandc win32-bc:
  40. bcc32 -O2 -d -w -w-aus $(CPPFLAGS) $(SOURCES)
  41. win32-cygwin32 win32-cygwin:
  42. gcc -mcygwin $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
  43. win32-digitalmars win32-dm:
  44. dmc -mn -o -w- $(CPPFLAGS) $(SOURCES)
  45. win32-intelc win32-ic:
  46. icl -nologo -MT -W3 -O2 -GF $(CPPFLAGS) $(SOURCES)
  47. win32-lccwin32:
  48. @echo "NOTE: need lcc 2002-07-25 or newer, older versions have bugs"
  49. lc -A -unused -O $(CPPFLAGS) $(SOURCES)
  50. win32-mingw32 win32-mingw:
  51. gcc -mno-cygwin $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
  52. win32-visualc win32-vc:
  53. cl -nologo -MT -W3 -O2 -GF $(CPPFLAGS) $(SOURCES)
  54. win32-watcomc win32-wc:
  55. wcl386 -bt=nt -zq -mf -5r -zc -w5 -oneatx $(CPPFLAGS) $(SOURCES)
  56. #
  57. # DOS (32-bit)
  58. #
  59. dos32-djgpp2 dos32-dj2:
  60. gcc $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
  61. dos32-watcomc dos32-wc:
  62. wcl386 -zq -mf -bt=dos -l=dos4g -5r -ox -zc $(CPPFLAGS) $(SOURCES)
  63. #
  64. # other targets
  65. #
  66. clean:
  67. rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM).map $(PROGRAM).tds
  68. rm -f *.err *.o *.obj
  69. .PHONY: default clean