## License would go here ######## # Tools CC = gcc RM = rm -f ################ # Build options CFLAGS = -g3 -O0 -Wall -DELF_USERSPACE_TEST LDFLAGS = ################## # Generated files # Test executable name TESTPROG = elftest ############### # Make targets .PHONY: all test-prog test-module clean all: test-prog test-module # The testing user-space application test-prog: $(TESTPROG) $(TESTPROG): elftest.o elf_module.o elf_utils.o $(CC) -o $@ $^ # The shared module to test on test-module: hello_def.so hello_ref.so hello_def.so: hello_def.o $(CC) -shared -o $@ $^ hello_ref.so: hello_ref.o $(CC) -shared -o $@ $^ # Cleanup target clean: -$(RM) *.o -$(RM) $(TESTPROG) -$(RM) *.so