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 6477a3aa26SEmanuele Giuseppe EspositoTEST_GEN_PROGS_x86_64 += x86_64/get_msr_index_features 653ae5b759SDavid MatlackTEST_GEN_PROGS_x86_64 += x86_64/exit_on_emulation_failure_test 666c2fa8b2SOliver UptonTEST_GEN_PROGS_x86_64 += x86_64/fix_hypercall_test 672c7f76b4SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_clock 687edcb734SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_cpuid 690fa32dadSVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_evmcs 7060325261SVipin SharmaTEST_GEN_PROGS_x86_64 += x86_64/hyperv_extended_hypercalls 71e2e1cc1fSVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_features 7299848924SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_ipi 73e67bd7dfSVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_svm_test 749e7726a8SVitaly KuznetsovTEST_GEN_PROGS_x86_64 += x86_64/hyperv_tlb_flush 7561fb1c54SOliver UptonTEST_GEN_PROGS_x86_64 += x86_64/kvm_clock_test 76ac4a4d6dSOliver UptonTEST_GEN_PROGS_x86_64 += x86_64/kvm_pv_test 779dba988eSAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/mmio_warning_test 782325d4ddSSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/monitor_mwait_test 7928c40b2cSSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/nested_exceptions_test 8061cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/platform_info_test 81bef9a701SJim MattsonTEST_GEN_PROGS_x86_64 += x86_64/pmu_event_filter_test 823df22524SEmanuele Giuseppe EspositoTEST_GEN_PROGS_x86_64 += x86_64/set_boot_cpu_id 8361cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/set_sregs_test 8452d3a4fbSDavid MatlackTEST_GEN_PROGS_x86_64 += x86_64/smaller_maxphyaddr_emulation_test 8561cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/smm_test 8661cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/state_test 878d7fbf01SMakarand SonareTEST_GEN_PROGS_x86_64 += x86_64/vmx_preemption_timer_test 8894c4b76bSAndrew JonesTEST_GEN_PROGS_x86_64 += x86_64/svm_vmcall_test 891ad32105SMaxim LevitskyTEST_GEN_PROGS_x86_64 += x86_64/svm_int_ctl_test 900bd2d3f4SMaxim LevitskyTEST_GEN_PROGS_x86_64 += x86_64/svm_nested_shutdown_test 91d8969871SMaciej S. SzmigieroTEST_GEN_PROGS_x86_64 += x86_64/svm_nested_soft_inject_test 92e467b0deSDavid WoodhouseTEST_GEN_PROGS_x86_64 += x86_64/tsc_scaling_sync 9361cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/sync_regs_test 94eede2065SJue WangTEST_GEN_PROGS_x86_64 += x86_64/ucna_injection_test 9510e7a099SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/userspace_io_test 963cea1891SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/userspace_msr_exit_test 9797a71a54SJim MattsonTEST_GEN_PROGS_x86_64 += x86_64/vmx_apic_access_test 9861cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/vmx_close_while_nested_test 9909444420SPaolo BonziniTEST_GEN_PROGS_x86_64 += x86_64/vmx_dirty_log_test 100e337f7e0SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/vmx_exception_with_invalid_guest_state 101ce30d8b9SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/vmx_msrs_test 102ab1ef344SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/vmx_invalid_nested_guest_state 103da1e3071SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/vmx_set_nested_state_test 10461cfcd54SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/vmx_tsc_adjust_test 105efe58549SIlias StamatisTEST_GEN_PROGS_x86_64 += x86_64/vmx_nested_tsc_scaling_test 106678e90a3SPeter ShierTEST_GEN_PROGS_x86_64 += x86_64/xapic_ipi_test 10785c68eb4SSean ChristophersonTEST_GEN_PROGS_x86_64 += x86_64/xapic_state_test 108*03a405b7SAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/xcr0_cpuid_test 109c90992bfSAaron LewisTEST_GEN_PROGS_x86_64 += x86_64/xss_msr_test 110449aa906SPeter XuTEST_GEN_PROGS_x86_64 += x86_64/debug_regs 1110c899c25SPaolo BonziniTEST_GEN_PROGS_x86_64 += x86_64/tsc_msrs_test 112825be3b5SYang WeijiangTEST_GEN_PROGS_x86_64 += x86_64/vmx_pmu_caps_test 1138d4e7e80SDavid WoodhouseTEST_GEN_PROGS_x86_64 += x86_64/xen_shinfo_test 11423200b7aSJoao MartinsTEST_GEN_PROGS_x86_64 += x86_64/xen_vmcall_test 1156a581508SPeter GondaTEST_GEN_PROGS_x86_64 += x86_64/sev_migrate_tests 116bf70636dSYang ZhongTEST_GEN_PROGS_x86_64 += x86_64/amx_test 117753dcf7aSZeng GuangTEST_GEN_PROGS_x86_64 += x86_64/max_vcpuid_cap_test 11830267b43SChenyi QiangTEST_GEN_PROGS_x86_64 += x86_64/triple_fault_event_test 119de1956f4SDavid MatlackTEST_GEN_PROGS_x86_64 += access_tracking_perf_test 120025eed7bSBen GardonTEST_GEN_PROGS_x86_64 += demand_paging_test 12194c4b76bSAndrew JonesTEST_GEN_PROGS_x86_64 += dirty_log_test 1224fd94ec7SBen GardonTEST_GEN_PROGS_x86_64 += dirty_log_perf_test 1231838b06bSIgnacio AlvaradoTEST_GEN_PROGS_x86_64 += hardware_disable_test 124fd4198bfSPaolo BonziniTEST_GEN_PROGS_x86_64 += kvm_create_max_vcpus 125b9c2bd50SYanan WangTEST_GEN_PROGS_x86_64 += kvm_page_table_test 126b58c55d5SSean ChristophersonTEST_GEN_PROGS_x86_64 += max_guest_memory_test 127f73a3446SBen GardonTEST_GEN_PROGS_x86_64 += memslot_modification_stress_test 128cad347faSMaciej S. SzmigieroTEST_GEN_PROGS_x86_64 += memslot_perf_test 12961e52f16SSean ChristophersonTEST_GEN_PROGS_x86_64 += rseq_test 1305b4f758fSSean ChristophersonTEST_GEN_PROGS_x86_64 += set_memory_region_test 13194c4b76bSAndrew JonesTEST_GEN_PROGS_x86_64 += steal_time 1320b45d587SJing ZhangTEST_GEN_PROGS_x86_64 += kvm_binary_stats_test 1333f9808caSOliver UptonTEST_GEN_PROGS_x86_64 += system_counter_offset_test 134fff8dcd7SAndrew Jones 1358448ec59SBen Gardon# Compiled outputs used by test targets 1368448ec59SBen GardonTEST_GEN_PROGS_EXTENDED_x86_64 += x86_64/nx_huge_pages_test 1378448ec59SBen Gardon 138797b8451SOliver UptonTEST_GEN_PROGS_aarch64 += aarch64/aarch32_id_regs 1394959d865SRaghavendra Rao AnantaTEST_GEN_PROGS_aarch64 += aarch64/arch_timer 1404f05223aSRicardo KollerTEST_GEN_PROGS_aarch64 += aarch64/debug-exceptions 141fd02029aSAndrew JonesTEST_GEN_PROGS_aarch64 += aarch64/get-reg-list 1425ca24697SRaghavendra Rao AnantaTEST_GEN_PROGS_aarch64 += aarch64/hypercalls 14335c58101SRicardo KollerTEST_GEN_PROGS_aarch64 += aarch64/page_fault_test 144bf08515dSOliver UptonTEST_GEN_PROGS_aarch64 += aarch64/psci_test 1452f5d27e6SReiji WatanabeTEST_GEN_PROGS_aarch64 += aarch64/vcpu_width_config 146dc0e058eSEric AugerTEST_GEN_PROGS_aarch64 += aarch64/vgic_init 14750b020cdSRicardo KollerTEST_GEN_PROGS_aarch64 += aarch64/vgic_irq 14845681804SOliver UptonTEST_GEN_PROGS_aarch64 += access_tracking_perf_test 149025eed7bSBen GardonTEST_GEN_PROGS_aarch64 += demand_paging_test 15094c4b76bSAndrew JonesTEST_GEN_PROGS_aarch64 += dirty_log_test 15187c5f35eSAndrew JonesTEST_GEN_PROGS_aarch64 += dirty_log_perf_test 15249fe9a5dSThomas HuthTEST_GEN_PROGS_aarch64 += kvm_create_max_vcpus 153b9c2bd50SYanan WangTEST_GEN_PROGS_aarch64 += kvm_page_table_test 154358928fdSRicardo KollerTEST_GEN_PROGS_aarch64 += memslot_modification_stress_test 155358928fdSRicardo KollerTEST_GEN_PROGS_aarch64 += memslot_perf_test 15661e52f16SSean ChristophersonTEST_GEN_PROGS_aarch64 += rseq_test 1575b4f758fSSean ChristophersonTEST_GEN_PROGS_aarch64 += set_memory_region_test 15894c4b76bSAndrew JonesTEST_GEN_PROGS_aarch64 += steal_time 1590b45d587SJing ZhangTEST_GEN_PROGS_aarch64 += kvm_binary_stats_test 160783e9e51SPaolo Bonzini 161be6f55a6SThomas HuthTEST_GEN_PROGS_s390x = s390x/memop 162b25d4cb4SJanosch FrankTEST_GEN_PROGS_s390x += s390x/resets 16394c4b76bSAndrew JonesTEST_GEN_PROGS_s390x += s390x/sync_regs_test 164c7ef9ebbSJanis Schoetterl-GlauschTEST_GEN_PROGS_s390x += s390x/tprot 165025eed7bSBen GardonTEST_GEN_PROGS_s390x += demand_paging_test 16694c4b76bSAndrew JonesTEST_GEN_PROGS_s390x += dirty_log_test 16749fe9a5dSThomas HuthTEST_GEN_PROGS_s390x += kvm_create_max_vcpus 168b9c2bd50SYanan WangTEST_GEN_PROGS_s390x += kvm_page_table_test 16961e52f16SSean ChristophersonTEST_GEN_PROGS_s390x += rseq_test 1705b4f758fSSean ChristophersonTEST_GEN_PROGS_s390x += set_memory_region_test 1710b45d587SJing ZhangTEST_GEN_PROGS_s390x += kvm_binary_stats_test 172783e9e51SPaolo Bonzini 1733e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += demand_paging_test 1743e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += dirty_log_test 1753e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += kvm_create_max_vcpus 1763e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += kvm_page_table_test 1773e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += set_memory_region_test 1783e06cdf1SAnup PatelTEST_GEN_PROGS_riscv += kvm_binary_stats_test 1793e06cdf1SAnup Patel 1806a5db83aSSean ChristophersonTEST_PROGS += $(TEST_PROGS_$(ARCH_DIR)) 1816a5db83aSSean ChristophersonTEST_GEN_PROGS += $(TEST_GEN_PROGS_$(ARCH_DIR)) 1826a5db83aSSean ChristophersonTEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) 1836a5db83aSSean ChristophersonLIBKVM += $(LIBKVM_$(ARCH_DIR)) 184783e9e51SPaolo Bonzini 1855efb946bSSean Christopherson# lib.mak defines $(OUTPUT), prepends $(OUTPUT)/ to $(TEST_GEN_PROGS), and most 1865efb946bSSean Christopherson# importantly defines, i.e. overwrites, $(CC) (unless `make -e` or `make CC=`, 1875efb946bSSean Christopherson# which causes the environment variable to override the makefile). 1885efb946bSSean Christophersoninclude ../lib.mk 1895efb946bSSean Christopherson 190783e9e51SPaolo BonziniINSTALL_HDR_PATH = $(top_srcdir)/usr 191783e9e51SPaolo BonziniLINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/ 192cc68765dSAndrew JonesLINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include 193b80db73dSVitaly Kuznetsovifeq ($(ARCH),x86_64) 194b80db73dSVitaly KuznetsovLINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/x86/include 195b80db73dSVitaly Kuznetsovelse 19666d69e08SShuah KhanLINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include 197b80db73dSVitaly Kuznetsovendif 198319f6f97SThomas HuthCFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ 199db7b780dSSean Christopherson -Wno-gnu-variable-sized-type-not-at-end \ 2007cf2e737SSean Christopherson -fno-builtin-memcmp -fno-builtin-memcpy -fno-builtin-memset \ 201319f6f97SThomas Huth -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ 202a5543d34SSean Christopherson -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ 2036a5db83aSSean Christopherson -I$(<D) -Iinclude/$(ARCH_DIR) -I ../rseq -I.. $(EXTRA_CFLAGS) \ 20466d42ac7SGavin Shan $(KHDR_INCLUDES) 205d7b9dc14SNina Schoetterl-Glauschifeq ($(ARCH),s390) 206d7b9dc14SNina Schoetterl-Glausch CFLAGS += -march=z10 207d7b9dc14SNina Schoetterl-Glauschendif 208c2390f16SPaolo Bonzini 2095dc38777SSean Christophersonno-pie-option := $(call try-run, echo 'int main(void) { return 0; }' | \ 2102b2d8afcSSean Christopherson $(CC) -Werror $(CFLAGS) -no-pie -x c - -o "$$TMP", -no-pie) 211c2390f16SPaolo Bonzini 2128343ba2dSChristian Borntraeger# On s390, build the testcases KVM-enabled 2135dc38777SSean Christophersonpgste-option = $(call try-run, echo 'int main(void) { return 0; }' | \ 2148343ba2dSChristian Borntraeger $(CC) -Werror -Wl$(comma)--s390-pgste -x c - -o "$$TMP",-Wl$(comma)--s390-pgste) 2158343ba2dSChristian Borntraeger 21666d42ac7SGavin ShanLDLIBS += -ldl 2178343ba2dSChristian BorntraegerLDFLAGS += -pthread $(no-pie-option) $(pgste-option) 218783e9e51SPaolo Bonzini 21929faeb96SAaron LewisLIBKVM_C := $(filter %.c,$(LIBKVM)) 22029faeb96SAaron LewisLIBKVM_S := $(filter %.S,$(LIBKVM)) 22129faeb96SAaron LewisLIBKVM_C_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_C)) 22229faeb96SAaron LewisLIBKVM_S_OBJ := $(patsubst %.S, $(OUTPUT)/%.o, $(LIBKVM_S)) 2236b6f7148SSean ChristophersonLIBKVM_STRING_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_STRING)) 2246b6f7148SSean ChristophersonLIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ) 225cdc979daSDavid Matlack 226cdc979daSDavid MatlackEXTRA_CLEAN += $(LIBKVM_OBJS) cscope.* 227783e9e51SPaolo Bonzini 22829faeb96SAaron Lewisx := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) 22929faeb96SAaron Lewis$(LIBKVM_C_OBJ): $(OUTPUT)/%.o: %.c 230783e9e51SPaolo Bonzini $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ 231783e9e51SPaolo Bonzini 23229faeb96SAaron Lewis$(LIBKVM_S_OBJ): $(OUTPUT)/%.o: %.S 23329faeb96SAaron Lewis $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ 23429faeb96SAaron Lewis 2356b6f7148SSean Christopherson# Compile the string overrides as freestanding to prevent the compiler from 2366b6f7148SSean Christopherson# generating self-referential code, e.g. without "freestanding" the compiler may 2376b6f7148SSean Christopherson# "optimize" memcmp() by invoking memcmp(), thus causing infinite recursion. 2386b6f7148SSean Christopherson$(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c 2396b6f7148SSean Christopherson $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -ffreestanding $< -o $@ 2406b6f7148SSean Christopherson 24166d69e08SShuah Khanx := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) 242cdc979daSDavid Matlack$(TEST_GEN_PROGS): $(LIBKVM_OBJS) 2438448ec59SBen Gardon$(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) 244eea192bfSAndrew Jones 245eea192bfSAndrew Jonescscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. 246eea192bfSAndrew Jonescscope: 247eea192bfSAndrew Jones $(RM) cscope.* 248eea192bfSAndrew Jones (find $(include_paths) -name '*.h' \ 249eea192bfSAndrew Jones -exec realpath --relative-base=$(PWD) {} \;; \ 250eea192bfSAndrew Jones find . -name '*.c' \ 251eea192bfSAndrew Jones -exec realpath --relative-base=$(PWD) {} \;) | sort -u > cscope.files 252eea192bfSAndrew Jones cscope -b 253