1 # makefile to manage collectd package
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 # Aihua Li, Huawei Technologies.
21 # Maryam Tahhan, Intel Corporation.
23 include ../mk/master.mk
24 include ../package-list.mk
26 WORK_DIR = intel-cmt-cat
27 TAG_DONE_FLAG = $(WORK_DIR)/.$(LIBPQOS_TAG).done
30 .PHONY: install force_install force_make
32 # install depends on make
33 force_install: force_make
36 @echo "Finished making $(WORK_DIR) "
38 INSTALL_TARGET = force_install force_make
40 force_make: $(WORK_DIR)
41 $(AT)cd $(WORK_DIR) && git pull $(LIBPQOS_URL) $(LIBPQOS_TAG)
43 $(AT)$(MAKE) -C $(WORK_DIR) $(MORE_MAKE_FLAGS)
47 $(AT)sudo $(MAKE) -C $(WORK_DIR) install PREFIX=/usr
49 $(AT)sudo modprobe msr
52 install: $(INSTALL_TARGET)
54 # hard way to clean and clobber
56 $(AT)cd $(WORK_DIR) && git clean -xfd *.o
58 $(AT)rm -rf $(WORK_DIR)
60 # distclean is for developer who would like to keep the
61 # clone git repo, saving time to fetch again from url
63 $(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f
66 @echo "Make test in $(WORK_DIR) (stub) "
69 @echo "Make sanity in $(WORK_DIR) (stub) "
72 $(AT)git clone $(LIBPQOS_URL)
74 $(TAG_DONE_FLAG): $(WORK_DIR)
75 $(AT)cd $(WORK_DIR); git checkout $(LIBPQOS_TAG)
76 ifneq ($(PATCH_FILE),)
77 $(AT)cd $(WORK_DIR); patch -p1 < ../$(PATCH_FILE)