summaryrefslogtreecommitdiff
path: root/sysutils/superiotool/files/patch-Makefile
blob: 8de94e3a0b8129041cc1a75bedd4d5d60d584400 (plain) (blame)
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
--- Makefile.orig	2012-10-19 16:44:32.000000000 +0300
+++ Makefile	2012-10-20 01:32:35.427651135 +0300
@@ -20,28 +20,24 @@
 
 PROGRAM = superiotool
 
-CC      = gcc
-INSTALL = /usr/bin/install
-PREFIX  = /usr/local
+CC      ?= gcc
+INSTALL ?= /usr/bin/install
+PREFIX  ?= /usr/local
 
 # Set the superiotool version string to the output of 'git describe'.
 
-VERSION := -D'SUPERIOTOOL_VERSION="$(shell git describe 2>/dev/null)"'
-
-CFLAGS += -O2 -Wall -Wstrict-prototypes -Wundef -Wstrict-aliasing \
-         -Werror-implicit-function-declaration -ansi -pedantic $(VERSION)
-LDFLAGS += -lz
+VERSION ?= -D'SUPERIOTOOL_VERSION="$(shell git describe 2>/dev/null)"'
 
 OBJS = superiotool.o serverengines.o ali.o fintek.o ite.o nsc.o nuvoton.o \
        smsc.o winbond.o infineon.o
 
-OS_ARCH = $(shell uname)
+OS_ARCH = FreeBSD
 ifeq ($(OS_ARCH), Darwin)
 LIBS = -framework IOKit -framework DirectHW -lpci -lz
 endif
 ifeq ($(OS_ARCH), FreeBSD)
-CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
-         -Werror-implicit-function-declaration -ansi $(VERSION) \
+CFLAGS += -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
+         -Werror-implicit-function-declaration $(VERSION) \
          -I/usr/local/include
 LDFLAGS += -L/usr/local/lib
 LIBS = -lz
@@ -69,8 +65,8 @@ $(PROGRAM): $(OBJS) superiotool.h
 install: $(PROGRAM)
 	mkdir -p $(DESTDIR)$(PREFIX)/sbin
 	$(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/sbin
-	mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8
-	$(INSTALL) $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8
+	mkdir -p $(DESTDIR)$(PREFIX)/man/man8
+	$(INSTALL) $(PROGRAM).8 $(DESTDIR)$(PREFIX)/man/man8
 
 clean:
 	rm -f $(PROGRAM) *.o