03-gcc-call.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. Author: Fabian Greffrath <fabian@debian-unofficial.org>
  2. Author: Mike Frysinger <vapier@gentoo.org>
  3. Description: Call C-Compiler via $(CC), consider CFLAGS, remove -static flag,
  4. drop linking against libncurses and change include dir order.
  5. Furthermore use standard env vars and remove pointless -I paths.
  6. --- a/makefile
  7. +++ b/makefile
  8. @@ -14,17 +14,16 @@ PACKAGES_DIRsl =
  9. SRCSsl = $(BASIC_DIR)source
  10. SRCS = $(SRCSsl)/
  11. +ifdef SYSINC
  12. INCLSYSDIR = //usr/include/sys
  13. INCLDIR = //usr/include
  14. -
  15. -DEFINES = -D__LINUX__ -D__unix__ -D__GCC__ -U__HAS_IO_H__
  16. -
  17. -ifdef DEBUG
  18. -LSWITCHES =
  19. +INCLS = -I$(INCLDIR) -idirafter $(INCLSYSDIR)
  20. else
  21. -LSWITCHES = -Wl,-s
  22. +INCLS =
  23. endif
  24. +DEFINES = -D__LINUX__ -D__unix__ -D__GCC__ -U__HAS_IO_H__
  25. +
  26. ##############################################################################
  27. all: unace
  28. @@ -47,7 +46,7 @@ UNACEEXENT_CFILES = \
  29. $(APPS_UNACEEXE_CFILES)
  30. unace: $(UNACEEXELIN_CFILES)
  31. - gcc $(LSWITCHES) -Wl,-lncurses -static -I$(INCLDIR) -I$(INCLSYSDIR) -I$(SRCSsl) $(DEFINES) $(UNACEEXELIN_CFILES) -ggdb -o$(EXECS_DIR)unace
  32. + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(INCLS) -I$(SRCSsl) $(DEFINES) $(UNACEEXELIN_CFILES) -o$(EXECS_DIR)unace
  33. ifndef DEBUG
  34. tar cfvz linunace25.tgz unace file_id.diz licence
  35. #sh linpack.sh