summaryrefslogtreecommitdiff
path: root/src/libXNVCtrl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/libXNVCtrl/Makefile')
-rw-r--r--src/libXNVCtrl/Makefile30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/libXNVCtrl/Makefile b/src/libXNVCtrl/Makefile
index 6942c3e..1e84ecb 100644
--- a/src/libXNVCtrl/Makefile
+++ b/src/libXNVCtrl/Makefile
@@ -24,31 +24,25 @@
# include common variables and functions
##############################################################################
-include utils.mk
+UTILS_MK_DIR ?= .
+
+include $(UTILS_MK_DIR)/utils.mk
+
+XNVCTRL_DIR ?= .
+include $(XNVCTRL_DIR)/xnvctrl.mk
##############################################################################
# assign variables
##############################################################################
-LIBXNVCTRL = libXNVCtrl.a
-
-LIBXNVCTRL_PROGRAM_NAME = "libXNVCtrl"
-
-LIBXNVCTRL_VERSION := $(NVIDIA_VERSION)
-
-X_CFLAGS ?=
-
-CFLAGS += $(X_CFLAGS)
+CFLAGS += $(XNVCTRL_CFLAGS)
CFLAGS += -I .
CFLAGS += -fPIC
CFLAGS += -I $(OUTPUTDIR)
-CFLAGS += -DPROGRAM_NAME=\"$(LIBXNVCTRL_PROGRAM_NAME)\"
-
-SRC += NVCtrl.c
-
-OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
+CFLAGS += -I $(XNVCTRL_DIR)
+LDFLAGS += $(XNVCTRL_LDFLAGS)
##############################################################################
# build rules
@@ -58,12 +52,6 @@ OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
all: $(LIBXNVCTRL)
-$(LIBXNVCTRL) : $(OBJS)
- $(AR) ru $@ $(OBJS)
-
-# define the rule to build each object file
-$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
-
clean:
rm -rf $(LIBXNVCTRL) *~ \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d