1
0

patch-Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. do not use static linking on Cygwin
  2. --- digitemp-3.6.0.orig/Makefile 2008-08-28 23:37:00.000000000 +0200
  3. +++ digitemp-3.6.0/Makefile 2011-01-14 21:37:33.000000000 +0100
  4. @@ -11,8 +11,9 @@
  5. VERSION = 3.6.0
  6. -CC = gcc
  7. -CFLAGS = -I./src -I./userial -O2 -Wall # -g
  8. +CC ?= gcc
  9. +CFLAGS ?= -I./src -I./userial
  10. +LDFLAGS ?=
  11. OBJS = src/digitemp.o src/device_name.o src/ds2438.o
  12. HDRS = src/digitemp.h src/device_name.h
  13. @@ -45,7 +46,7 @@ DS2490OBJS = userial/ds2490/ownet.o user
  14. # If you add a new OSTYPE here please email it to me so that I can add
  15. # it to the distribution in the next release
  16. # -----------------------------------------------------------------------
  17. -SYSTYPE := $(shell uname -s)
  18. +SYSTYPE := Linux
  19. ifeq ($(SYSTYPE), Linux)
  20. CFLAGS += -DLINUX
  21. @@ -57,7 +58,6 @@ endif
  22. ifneq (, $(findstring CYGWIN,$(SYSTYPE)))
  23. CFLAGS += -DCYGWIN
  24. - LIBS += -static -static-libgcc
  25. endif
  26. ifeq ($(SYSTYPE), SunOS)
  27. @@ -116,13 +116,13 @@ all: help
  28. # Build the Linux executable
  29. ds9097: $(OBJS) $(HDRS) $(ONEWIREOBJS) $(ONEWIREHDRS) $(DS9097OBJS)
  30. - $(CC) $(OBJS) $(ONEWIREOBJS) $(DS9097OBJS) -o digitemp_DS9097 $(LIBS)
  31. + $(CC) $(LDFLAGS) $(OBJS) $(ONEWIREOBJS) $(DS9097OBJS) -o digitemp_DS9097 $(LIBS)
  32. ds9097u: $(OBJS) $(HDRS) $(ONEWIREOBJS) $(ONEWIREHDRS) $(DS9097UOBJS)
  33. - $(CC) $(OBJS) $(ONEWIREOBJS) $(DS9097UOBJS) -o digitemp_DS9097U $(LIBS)
  34. + $(CC) $(LDFLAGS) $(OBJS) $(ONEWIREOBJS) $(DS9097UOBJS) -o digitemp_DS9097U $(LIBS)
  35. ds2490: $(OBJS) $(HDRS) $(ONEWIREOBJS) $(ONEWIREHDRS) $(DS2490OBJS)
  36. - $(CC) $(OBJS) $(ONEWIREOBJS) $(DS2490OBJS) -o digitemp_DS2490 $(LIBS)
  37. + $(CC) $(LDFLAGS) $(OBJS) $(ONEWIREOBJS) $(DS2490OBJS) -o digitemp_DS2490 $(LIBS)
  38. # Clean up the object files and the sub-directory for distributions