On Wed, Jul 17, 2019 at 03:37:03PM -0700, Xing, Cedric wrote: > > +$(TEST_CUSTOM_PROGS): $(OUTPUT)/main.o $(OUTPUT)/sgx_call.o \ > > + $(OUTPUT)/encl_piggy.o > > + $(CC) $(HOST_CFLAGS) -o $@ $^ > > + > > +$(OUTPUT)/main.o: main.c > > + $(CC) $(HOST_CFLAGS) -c $< -o $@ > > .o files don't have to be generated/kept. And to be consistent with other > selftests, please don't generate/keep them.
AFAIK there is no rule that .o files can't be generated when it makes sense. In your other comment you correctly pointed out that "-I$(OUTPUT)" was missing when compiling encl_piggy.S. However, it is required neither main.c nor sgx_call.c, and thus should not be used there. The consequences are: 1. The enclave can and should be compiled like you suggest here. 2. The enclave hosting program must be compiled as it has been. /Jarkko