git.fiddlerwoaroof.com
Browse code

CJPM-5222 basic os check for install

Greg Wiley authored on 03/04/2017 21:26:08
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 MODULEFLAGS = -fPIC -fno-stack-protector
2 2
 MODULEOBJS = dual_control.o
3 3
 MODULELIB = pam_dual_control.so
4
-
4
+UNAME_S := $(shell uname -s)
5 5
 
6 6
 .PHONY: all
7 7
 all: test dual_control.a
... ...
@@ -29,8 +29,15 @@ dual_control_test: dual_control_test.c $(MODULEOBJS)
29 29
 test: dual_control_test
30 30
 	@./dual_control_test > /dev/null
31 31
 
32
+
32 33
 .PHONY: install
33 34
 install: $(MODULEOBJS)
35
+ifeq ($(UNAME_S), Linux)
34 36
 	ld -x --shared -o @PAM_MODULE_DIRECTORY@/$(MODULELIB) $(MODULEOBJS)
37
+else
38
+	@echo installation recipe not known for $(UNAME_S)
39
+endif
40
+
41
+
35 42
 
36 43