1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2b61442dfSMasahiro Yamadainclude ../../../build/Build.include 3c2390f16SPaolo Bonzini 4783e9e51SPaolo Bonziniall: 5783e9e51SPaolo Bonzini 6cc68765dSAndrew Jonestop_srcdir = ../../../.. 7baea2ce5SPaolo Bonziniinclude $(top_srcdir)/scripts/subarch.include 8baea2ce5SPaolo BonziniARCH ?= $(SUBARCH) 966d69e08SShuah Khan 106a5db83aSSean Christophersonifeq ($(ARCH),x86) 116a5db83aSSean Christopherson ARCH_DIR := x86_64 126a5db83aSSean Christophersonelse ifeq ($(ARCH),arm64) 136a5db83aSSean Christopherson ARCH_DIR := aarch64 146a5db83aSSean Christophersonelse ifeq ($(ARCH),s390) 156a5db83aSSean Christopherson ARCH_DIR := s390x 166a5db83aSSean Christophersonelse 176a5db83aSSean Christopherson ARCH_DIR := $(ARCH) 183e06cdf1SAnup Patelendif 1966d69e08SShuah Khan 20cf97d5e9SDavid MatlackLIBKVM += lib/assert.c 21cf97d5e9SDavid MatlackLIBKVM += lib/elf.c 22cf97d5e9SDavid MatlackLIBKVM += lib/guest_modes.c 23cf97d5e9SDavid MatlackLIBKVM += lib/io.c 24cf97d5e9SDavid MatlackLIBKVM += lib/kvm_util.c 259fda6753SDavid MatlackLIBKVM += lib/memstress.c 26cf97d5e9SDavid MatlackLIBKVM += lib/rbtree.c 27cf97d5e9SDavid MatlackLIBKVM += lib/sparsebit.c 28cf97d5e9SDavid MatlackLIBKVM += lib/test_util.c 2970466381SSean ChristophersonLIBKVM += lib/ucall_common.c 30a93871d0SRicardo KollerLIBKVM += lib/userfaultfd_util.c 31cf97d5e9SDavid Matlack 326b6f7148SSean ChristophersonLIBKVM_STRING += lib/string_override.c 336b6f7148SSean Christopherson 34cf97d5e9SDavid MatlackLIBKVM_x86_64 += lib/x86_64/apic.c 35cf97d5e9SDavid MatlackLIBKVM_x86_64 += lib/x86_64/handlers.S 36e8f3d23cSVitaly KuznetsovLIBKVM_x86_64 += lib/x86_64/hyperv.c 379fda6753SDavid MatlackLIBKVM_x86_64 += lib/x86_64/memstress.c 38cf97d5e9SDavid MatlackLIBKVM_x86_64 += lib/x86_64/processor.c 39cf97d5e9SDavid MatlackLIBKVM_x86_64 += lib/x86_64/svm.c 40cf97d5e9SDavid MatlackLIBKVM_x86_64 += lib/x86_64/ucall.c 41cf97d5e9SDavid MatlackLIBKVM_x86_64 += lib/x86_64/vmx.c 42cf97d5e9SDavid Matlack 43cf97d5e9SDavid MatlackLIBKVM_aarch64 += lib/aarch64/gic.c 44cf97d5e9SDavid MatlackLIBKVM_aarch64 += lib/aarch64/gic_v3.c 45cf97d5e9SDavid MatlackLIBKVM_aarch64 += lib/aarch64/handlers.S 46cf97d5e9SDavid MatlackLIBKVM_aarch64 += lib/aarch64/processor.c 47cf97d5e9SDavid MatlackLIBKVM_aarch64 += lib/aarch64/spinlock.c 48cf97d5e9SDavid MatlackLIBKVM_aarch64 += lib/aarch64/ucall.c 49cf97d5e9SDavid MatlackLIBKVM_aarch64 += lib/aarch64/vgic.c 50cf97d5e9SDavid Matlack 51cf97d5e9SDavid MatlackLIBKVM_s390x += lib/s390x/diag318_test_handler.c 52cf97d5e9SDavid MatlackLIBKVM_s390x += lib/s390x/processor.c 53cf97d5e9SDavid MatlackLIBKVM_s390x += lib/s390x/ucall.c 54cf97d5e9SDavid Matlack 55cf97d5e9SDavid MatlackLIBKVM_riscv += lib/riscv/processor.c 56cf97d5e9SDavid MatlackLIBKVM_riscv += lib/riscv/ucall.c 57783e9e51SPaolo Bonzini 588448ec59SBen Gardon# Non-compiled test targets 598448ec59SBen GardonTEST_PROGS_x86_64 += x86_64/nx_huge_pages_test.sh 608448ec59SBen Gardon 618448ec59SBen Gardon# Compiled test targets 629e6d484fSVitaly KuznetsovTEST_GEN_PROGS_x86_64 = x86_64/cpuid_test 639e6d484fSVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/cr4_cpuid_sync_test 64*dfa78a20SBen GardonTEST_GEN_PROGS_x86_64 += x86_64/dirty_log_page_splitting_test 6577a3aa26SEmanuele Giuseppe EspositoTEST_GEN_PROGS_x86_64 += x86_64/get_msr_index_features 663ae5b759SDavid MatlackTEST_GEN_PROGS_x86_64 += x86_64/exit_on_emulation_failure_test 676c2fa8b2SOliver UptonTEST_GEN_PROGS_x86_64 += x86_64/fix_hypercall_test 682c7f76b4SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_clock 697edcb734SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_cpuid 700fa32dadSVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_evmcs 7160325261SVipin SharmaTEST_GEN_PROGS_x86_64 += x86_64/hyperv_extended_hypercalls 72e2e1cc1fSVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_features 7399848924SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_ipi 74e67bd7dfSVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_svm_test 759e7726a8SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_tlb_flush 7661fb1c54SOliver UptonTEST_GEN_PROGS_x86_64 += x86_64/kvm_clock_test 77ac4a4d6dSOliver UptonTEST_GEN_PROGS_x86_64 += x86_64/kvm_pv_test 789dba988eSAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/mmio_warning_test 792325d4ddSSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/monitor_mwait_test 8028c40b2cSSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/nested_exceptions_test 8161cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/platform_info_test 82bef9a701SJim MattsonTEST_GEN_PROGS_x86_64 += x86_64/pmu_event_filter_test 833df22524SEmanuele Giuseppe EspositoTEST_GEN_PROGS_x86_64 += x86_64/set_boot_cpu_id 8461cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/set_sregs_test 8552d3a4fbSDavid MatlackTEST_GEN_PROGS_x86_64 += x86_64/smaller_maxphyaddr_emulation_test 8661cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/smm_test 8761cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/state_test 888d7fbf01SMakarand SonareTEST_GEN_PROGS_x86_64 += x86_64/vmx_preemption_timer_test 8994c4b76bSAndrew JonesTEST_GEN_PROGS_x86_64 += x86_64/svm_vmcall_test 901ad32105SMaxim LevitskyTEST_GEN_PROGS_x86_64 += x86_64/svm_int_ctl_test 910bd2d3f4SMaxim LevitskyTEST_GEN_PROGS_x86_64 += x86_64/svm_nested_shutdown_test 92d8969871SMaciej S. SzmigieroTEST_GEN_PROGS_x86_64 += x86_64/svm_nested_soft_inject_test 93e467b0deSDavid WoodhouseTEST_GEN_PROGS_x86_64 += x86_64/tsc_scaling_sync 9461cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/sync_regs_test 95eede2065SJue WangTEST_GEN_PROGS_x86_64 += x86_64/ucna_injection_test 9610e7a099SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/userspace_io_test 973cea1891SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/userspace_msr_exit_test 9897a71a54SJim MattsonTEST_GEN_PROGS_x86_64 += x86_64/vmx_apic_access_test 9961cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/vmx_close_while_nested_test 10009444420SPaolo BonziniTEST_GEN_PROGS_x86_64 += x86_64/vmx_dirty_log_test 101e337f7e0SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/vmx_exception_with_invalid_guest_state 102ce30d8b9SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/vmx_msrs_test 103ab1ef344SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/vmx_invalid_nested_guest_state 104da1e3071SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/vmx_set_nested_state_test 10561cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/vmx_tsc_adjust_test 106efe58549SIlias StamatisTEST_GEN_PROGS_x86_64 += x86_64/vmx_nested_tsc_scaling_test 107678e90a3SPeter ShierTEST_GEN_PROGS_x86_64 += x86_64/xapic_ipi_test 10885c68eb4SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/xapic_state_test 10903a405b7SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/xcr0_cpuid_test 110c90992bfSAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/xss_msr_test 111449aa906SPeter XuTEST_GEN_PROGS_x86_64 += x86_64/debug_regs 1120c899c25SPaolo BonziniTEST_GEN_PROGS_x86_64 += x86_64/tsc_msrs_test 113825be3b5SYang WeijiangTEST_GEN_PROGS_x86_64 += x86_64/vmx_pmu_caps_test 1148d4e7e80SDavid WoodhouseTEST_GEN_PROGS_x86_64 += x86_64/xen_shinfo_test 11523200b7aSJoao MartinsTEST_GEN_PROGS_x86_64 += x86_64/xen_vmcall_test 1166a581508SPeter GondaTEST_GEN_PROGS_x86_64 += x86_64/sev_migrate_tests 117bf70636dSYang ZhongTEST_GEN_PROGS_x86_64 += x86_64/amx_test 118753dcf7aSZeng GuangTEST_GEN_PROGS_x86_64 += x86_64/max_vcpuid_cap_test 11930267b43SChenyi QiangTEST_GEN_PROGS_x86_64 += x86_64/triple_fault_event_test 120de1956f4SDavid MatlackTEST_GEN_PROGS_x86_64 += access_tracking_perf_test 121025eed7bSBen GardonTEST_GEN_PROGS_x86_64 += demand_paging_test 12294c4b76bSAndrew JonesTEST_GEN_PROGS_x86_64 += dirty_log_test 1234fd94ec7SBen GardonTEST_GEN_PROGS_x86_64 += dirty_log_perf_test 1241838b06bSIgnacio AlvaradoTEST_GEN_PROGS_x86_64 += hardware_disable_test 125fd4198bfSPaolo BonziniTEST_GEN_PROGS_x86_64 += kvm_create_max_vcpus 126b9c2bd50SYanan WangTEST_GEN_PROGS_x86_64 += kvm_page_table_test 127b58c55d5SSean ChristophersonTEST_GEN_PROGS_x86_64 += max_guest_memory_test 128f73a3446SBen GardonTEST_GEN_PROGS_x86_64 += memslot_modification_stress_test 129cad347faSMaciej S. SzmigieroTEST_GEN_PROGS_x86_64 += memslot_perf_test 13061e52f16SSean ChristophersonTEST_GEN_PROGS_x86_64 += rseq_test 1315b4f758fSSean ChristophersonTEST_GEN_PROGS_x86_64 += set_memory_region_test 13294c4b76bSAndrew JonesTEST_GEN_PROGS_x86_64 += steal_time 1330b45d587SJing ZhangTEST_GEN_PROGS_x86_64 += kvm_binary_stats_test 1343f9808caSOliver UptonTEST_GEN_PROGS_x86_64 += system_counter_offset_test 135fff8dcd7SAndrew Jones 1368448ec59SBen Gardon# Compiled outputs used by test targets 1378448ec59SBen GardonTEST_GEN_PROGS_EXTENDED_x86_64 += x86_64/nx_huge_pages_test 1388448ec59SBen Gardon 139797b8451SOliver UptonTEST_GEN_PROGS_aarch64 += aarch64/aarch32_id_regs 1404959d865SRaghavendra Rao AnantaTEST_GEN_PROGS_aarch64 += aarch64/arch_timer 1414f05223aSRicardo KollerTEST_GEN_PROGS_aarch64 += aarch64/debug-exceptions 142fd02029aSAndrew JonesTEST_GEN_PROGS_aarch64 += aarch64/get-reg-list 1435ca24697SRaghavendra Rao AnantaTEST_GEN_PROGS_aarch64 += aarch64/hypercalls 14435c58101SRicardo KollerTEST_GEN_PROGS_aarch64 += aarch64/page_fault_test 145bf08515dSOliver UptonTEST_GEN_PROGS_aarch64 += aarch64/psci_test 14660e7dadeSOliver UptonTEST_GEN_PROGS_aarch64 += aarch64/smccc_filter 1472f5d27e6SReiji WatanabeTEST_GEN_PROGS_aarch64 += aarch64/vcpu_width_config 148dc0e058eSEric AugerTEST_GEN_PROGS_aarch64 += aarch64/vgic_init 14950b020cdSRicardo KollerTEST_GEN_PROGS_aarch64 += aarch64/vgic_irq 15045681804SOliver UptonTEST_GEN_PROGS_aarch64 += access_tracking_perf_test 151025eed7bSBen GardonTEST_GEN_PROGS_aarch64 += demand_paging_test 15294c4b76bSAndrew JonesTEST_GEN_PROGS_aarch64 += dirty_log_test 15387c5f35eSAndrew JonesTEST_GEN_PROGS_aarch64 += dirty_log_perf_test 15449fe9a5dSThomas HuthTEST_GEN_PROGS_aarch64 += kvm_create_max_vcpus 155b9c2bd50SYanan WangTEST_GEN_PROGS_aarch64 += kvm_page_table_test 156358928fdSRicardo KollerTEST_GEN_PROGS_aarch64 += memslot_modification_stress_test 157358928fdSRicardo KollerTEST_GEN_PROGS_aarch64 += memslot_perf_test 15861e52f16SSean ChristophersonTEST_GEN_PROGS_aarch64 += rseq_test 1595b4f758fSSean ChristophersonTEST_GEN_PROGS_aarch64 += set_memory_region_test 16094c4b76bSAndrew JonesTEST_GEN_PROGS_aarch64 += steal_time 1610b45d587SJing ZhangTEST_GEN_PROGS_aarch64 += kvm_binary_stats_test 162783e9e51SPaolo Bonzini 163be6f55a6SThomas HuthTEST_GEN_PROGS_s390x = s390x/memop 164b25d4cb4SJanosch FrankTEST_GEN_PROGS_s390x += s390x/resets 16594c4b76bSAndrew JonesTEST_GEN_PROGS_s390x += s390x/sync_regs_test 166c7ef9ebbSJanis Schoetterl-GlauschTEST_GEN_PROGS_s390x += s390x/tprot 167025eed7bSBen GardonTEST_GEN_PROGS_s390x += demand_paging_test 16894c4b76bSAndrew JonesTEST_GEN_PROGS_s390x += dirty_log_test 16949fe9a5dSThomas HuthTEST_GEN_PROGS_s390x += kvm_create_max_vcpus 170b9c2bd50SYanan WangTEST_GEN_PROGS_s390x += kvm_page_table_test 17161e52f16SSean ChristophersonTEST_GEN_PROGS_s390x += rseq_test 1725b4f758fSSean ChristophersonTEST_GEN_PROGS_s390x += set_memory_region_test 1730b45d587SJing ZhangTEST_GEN_PROGS_s390x += kvm_binary_stats_test 174783e9e51SPaolo Bonzini 1753e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += demand_paging_test 1763e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += dirty_log_test 1773e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += kvm_create_max_vcpus 1783e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += kvm_page_table_test 1793e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += set_memory_region_test 1803e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += kvm_binary_stats_test 1813e06cdf1SAnup Patel 1826a5db83aSSean ChristophersonTEST_PROGS += $(TEST_PROGS_$(ARCH_DIR)) 1836a5db83aSSean ChristophersonTEST_GEN_PROGS += $(TEST_GEN_PROGS_$(ARCH_DIR)) 1846a5db83aSSean ChristophersonTEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) 1856a5db83aSSean ChristophersonLIBKVM += $(LIBKVM_$(ARCH_DIR)) 186783e9e51SPaolo Bonzini 1875efb946bSSean Christopherson# lib.mak defines $(OUTPUT), prepends $(OUTPUT)/ to $(TEST_GEN_PROGS), and most 1885efb946bSSean Christopherson# importantly defines, i.e. overwrites, $(CC) (unless `make -e` or `make CC=`, 1895efb946bSSean Christopherson# which causes the environment variable to override the makefile). 1905efb946bSSean Christophersoninclude ../lib.mk 1915efb946bSSean Christopherson 192783e9e51SPaolo BonziniINSTALL_HDR_PATH = $(top_srcdir)/usr 193783e9e51SPaolo BonziniLINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/ 194cc68765dSAndrew JonesLINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include 195b80db73dSVitaly Kuznetsovifeq ($(ARCH),x86_64) 196b80db73dSVitaly KuznetsovLINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/x86/include 197b80db73dSVitaly Kuznetsovelse 19866d69e08SShuah KhanLINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include 199b80db73dSVitaly Kuznetsovendif 200319f6f97SThomas HuthCFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ 201db7b780dSSean Christopherson -Wno-gnu-variable-sized-type-not-at-end \ 2027cf2e737SSean Christopherson -fno-builtin-memcmp -fno-builtin-memcpy -fno-builtin-memset \ 203319f6f97SThomas Huth -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ 204a5543d34SSean Christopherson -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ 2056a5db83aSSean Christopherson -I$(<D) -Iinclude/$(ARCH_DIR) -I ../rseq -I.. $(EXTRA_CFLAGS) \ 20666d42ac7SGavin Shan $(KHDR_INCLUDES) 207d7b9dc14SNina Schoetterl-Glauschifeq ($(ARCH),s390) 208d7b9dc14SNina Schoetterl-Glausch CFLAGS += -march=z10 209d7b9dc14SNina Schoetterl-Glauschendif 210c2390f16SPaolo Bonzini 2115dc38777SSean Christophersonno-pie-option := $(call try-run, echo 'int main(void) { return 0; }' | \ 2122b2d8afcSSean Christopherson $(CC) -Werror $(CFLAGS) -no-pie -x c - -o "$$TMP", -no-pie) 213c2390f16SPaolo Bonzini 2148343ba2dSChristian Borntraeger# On s390, build the testcases KVM-enabled 2155dc38777SSean Christophersonpgste-option = $(call try-run, echo 'int main(void) { return 0; }' | \ 2168343ba2dSChristian Borntraeger $(CC) -Werror -Wl$(comma)--s390-pgste -x c - -o "$$TMP",-Wl$(comma)--s390-pgste) 2178343ba2dSChristian Borntraeger 21866d42ac7SGavin ShanLDLIBS += -ldl 2198343ba2dSChristian BorntraegerLDFLAGS += -pthread $(no-pie-option) $(pgste-option) 220783e9e51SPaolo Bonzini 22129faeb96SAaron LewisLIBKVM_C := $(filter %.c,$(LIBKVM)) 22229faeb96SAaron LewisLIBKVM_S := $(filter %.S,$(LIBKVM)) 22329faeb96SAaron LewisLIBKVM_C_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_C)) 22429faeb96SAaron LewisLIBKVM_S_OBJ := $(patsubst %.S, $(OUTPUT)/%.o, $(LIBKVM_S)) 2256b6f7148SSean ChristophersonLIBKVM_STRING_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_STRING)) 2266b6f7148SSean ChristophersonLIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ) 227cdc979daSDavid Matlack 228cdc979daSDavid MatlackEXTRA_CLEAN += $(LIBKVM_OBJS) cscope.* 229783e9e51SPaolo Bonzini 23029faeb96SAaron Lewisx := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) 23129faeb96SAaron Lewis$(LIBKVM_C_OBJ): $(OUTPUT)/%.o: %.c 232783e9e51SPaolo Bonzini $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ 233783e9e51SPaolo Bonzini 23429faeb96SAaron Lewis$(LIBKVM_S_OBJ): $(OUTPUT)/%.o: %.S 23529faeb96SAaron Lewis $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ 23629faeb96SAaron Lewis 2376b6f7148SSean Christopherson# Compile the string overrides as freestanding to prevent the compiler from 2386b6f7148SSean Christopherson# generating self-referential code, e.g. without "freestanding" the compiler may 2396b6f7148SSean Christopherson# "optimize" memcmp() by invoking memcmp(), thus causing infinite recursion. 2406b6f7148SSean Christopherson$(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c 2416b6f7148SSean Christopherson $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -ffreestanding $< -o $@ 2426b6f7148SSean Christopherson 24366d69e08SShuah Khanx := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) 244cdc979daSDavid Matlack$(TEST_GEN_PROGS): $(LIBKVM_OBJS) 2458448ec59SBen Gardon$(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) 246eea192bfSAndrew Jones 247eea192bfSAndrew Jonescscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. 248eea192bfSAndrew Jonescscope: 249eea192bfSAndrew Jones $(RM) cscope.* 250eea192bfSAndrew Jones (find $(include_paths) -name '*.h' \ 251eea192bfSAndrew Jones -exec realpath --relative-base=$(PWD) {} \;; \ 252eea192bfSAndrew Jones find . -name '*.c' \ 253eea192bfSAndrew Jones -exec realpath --relative-base=$(PWD) {} \;) | sort -u > cscope.files 254eea192bfSAndrew Jones cscope -b 255