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