aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5ff29e5..a09fa7a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,15 @@
NAME= numlock
VERSION = $(shell awk '/define version/ { print $$3 }' $(NAME).spec)
+LIB_NAME = lib
+ifneq (,$(shell uname -m | grep "\(x86_64\|sparc64\|ppc64\|s390x\)"))
+LIB_NAME = lib64
+endif
+
TOP=
CFLAGS=-g -O2 -Wall
CC=gcc
-FLAGS=-lX11 -lXtst -I/usr/X11R6/include -L/usr/X11R6/lib
+FLAGS=-lX11 -lXtst -I/usr/X11R6/include -L/usr/X11R6/$(LIB_NAME)
enable_X11_numlock: enable_X11_numlock.c
$(CC) $(CFLAGS) $(FLAGS) -o $@ $<