diff options
-rw-r--r-- | Makefile.in | 11 | ||||
-rw-r--r-- | ghw/README.md | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in index db9d9ecab..561510bc5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -479,19 +479,26 @@ ghwdump: ghwdump$(EXEEXT) ghwdump$(EXEEXT): $(GHWDUMP_OBJS) $(CC) -o $@ $(GHWDUMP_OBJS) +ghwlib$(SOEXT): ghwlib.o + $(CC) $(PIC_FLAGS) -shared -o lib/$@ ghwlib.o + ghwdump.o: $(srcdir)/ghw/ghwdump.c $(srcdir)/ghw/ghwlib.h $(CC) -c -o $@ $< $(OPT_FLAGS) $(WARN_CFLAGS) ghwlib.o: $(srcdir)/ghw/ghwlib.c $(srcdir)/ghw/ghwlib.h - $(CC) -c -o $@ $< $(OPT_FLAGS) $(WARN_CFLAGS) + $(CC) $(PIC_FLAGS) -c -o $@ $< $(OPT_FLAGS) $(WARN_CFLAGS) -all.ghw: ghwdump$(EXEEXT) +all.ghw: ghwdump$(EXEEXT) ghwlib$(SOEXT) install.ghw: $(INSTALL_PROGRAM) -p ghwdump$(EXEEXT) $(DESTDIR)$(bindir)/ + $(INSTALL_PROGRAM) -p lib/ghwlib$(SOEXT) $(DESTDIR)$(libdir)/ + $(INSTALL_DATA) -p $(srcdir)/ghw/ghwlib.h $(DESTDIR)$(incdir)/ghdl/ uninstall.ghw: $(RM) $(DESTDIR)$(bindir)/ghwdump$(EXEEXT) + $(RM) $(DESTDIR)$(libdir)/ghwlib$(EXEEXT) + $(RM) -f $(DESTDIR)$(incdir)/ghdl/ghwlib.h ############### grt ##################################################### diff --git a/ghw/README.md b/ghw/README.md index e64bbf769..300e10a74 100644 --- a/ghw/README.md +++ b/ghw/README.md @@ -4,6 +4,9 @@ This subdir contains C helpers for managing GHDL Wavefiles (GHW). These sources are used in GTKWave for reading GHW waves (see [gtkwave/gtkwave/search?q=ghwlib](https://github.com/gtkwave/gtkwave/search?q=ghwlib)). - `ghwlib.c` and `ghwlib.h` provide the reader library. -- `ghwdump.c` uses the library for dumping the content of GHW files in text, for debugging purposes. `ghwdump` is built and installed with GHDL by default, and it is used in the test suite. +- `ghwdump.c` uses the library for dumping the content of GHW files in text, for debugging purposes. + +A shared library named `ghwlib.[so|dll]` and `ghwdump` are built and installed with GHDL by default. +Furthermore, `ghwdump` is used in the test suite. These helpers are independent from GHDL's codebase. However, the GHW format is not specified, so it might change as a result of internal tweaks in GHDL. Hence, it is strongly suggested to use the helpers provided in the GHDL installation. |