cms-gem-daq-project / ctp7_modules

0 stars 13 forks source link

Fix error in Makefile #98

Closed jsturdy closed 5 years ago

jsturdy commented 5 years ago

Dependent objects were not being built, e.g., amc.o was built, but not amc/ttc.o. As such, they were not being triggered by the shared object rule that was designed to add them to the amc.so shared object.

Description

Modify the .so pattern rule to do a .SECONDEXPANSION and dynamically include all object files matching the stem, e.g., the rule will build this automatically based on

$(PackageLibDir)/%.so: $$(filter $$(PackageObjectDir)/$$*$$(pc).o, $(TargetObjects))

expanding into

lib/amc.so: amc.o amc/ttc.o amc/daq.o amc/sca.o

Types of changes

Motivation and Context

Compartmentalized objects to simplify code were not being included into the associated shared object.

How Has This Been Tested?

Tested on rebased Reed--Muller branch; compiles as expected, symbols are properly linked

Screenshots (if appropriate):

Checklist:

jsturdy commented 5 years ago

I need one more change here, as optohybrid is not listed as a dependency of vfat3, but vfat3 needs broadcastReadLocal which is coming from optohybrid