Makefile 363 B

12345678910111213141516171819
  1. TESTDIR=../
  2. include $(TESTDIR)/Rules.mak
  3. all: dltest shared run
  4. dltest:
  5. $(CC) $(CFLAGS) -c dltest.c -o dltest.o
  6. $(CC) $(CFLAGS) -c howdy.c -o howdy.o
  7. shared:
  8. $(CC) $(CFLAGS) -shared -o libhowdy.so -Wl,-soname,libhowdy.so howdy.o
  9. $(CC) $(CFLAGS) -o dltest dltest.o -ldl
  10. run:
  11. @echo Running dltest
  12. ./dltest
  13. clean:
  14. rm -f *.o *.so dltest core libhowdy.so