Skip to content

Commit

Permalink
Refactor static lib to libsupernovas.a (libnovas.a is a symlink)
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 29, 2024
1 parent 04343e7 commit c07614f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ clean:
# Remove all generated files
.PHONY: distclean
distclean: clean
rm -f $(LIB)/libsupernovas.so* $(LIB)/libnovas.so* $(LIB)/libnovas.a $(LIB)/libsolsys*.so* cio_ra.bin
rm -f $(LIB)/libsupernovas.so* $(LIB)/libsupernovas.a $(LIB)/libnovas.so* $(LIB)/libnovas.a $(LIB)/libsolsys*.so* cio_ra.bin

# ----------------------------------------------------------------------------
# The nitty-gritty stuff below
Expand Down Expand Up @@ -161,9 +161,12 @@ $(LIB)/libsolsys-calceph.so.$(SO_VERSION): $(SRC)/solsys-calceph.c | $(LIB)/libs
$(LIB)/libsolsys-cspice.so.$(SO_VERSION): LDFLAGS += -lcspice
$(LIB)/libsolsys-cspice.so.$(SO_VERSION): $(SRC)/solsys-cspice.c | $(LIB)/libsupernovas.so

# Static library: libsupernovas.a
$(LIB)/libsupernovas.a: $(OBJECTS) | $(LIB) Makefile

# Static library: libnovas.a
$(LIB)/libnovas.a: $(OBJECTS) | $(LIB) Makefile
$(LIB)/libnovas.a: $(LIB)/libsupernovas.a
@rm -f $@
ln -sr $< $@

# CIO locator data
cio_ra.bin: data/CIO_RA.TXT $(BIN)/cio_file
Expand Down Expand Up @@ -212,7 +215,7 @@ install-libs:
ifneq ($(wildcard $(LIB)/*),)
@echo "installing libraries to $(DESTDIR)$(libdir)"
install -d $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) -D $(LIB)/lib*.so* $(DESTDIR)$(libdir)/
$(INSTALL_PROGRAM) -D $(LIB)/lib* $(DESTDIR)$(libdir)/
else
@echo "WARNING! Skipping libs install: needs 'shared' and/or 'static'"
endif
Expand Down

0 comments on commit c07614f

Please sign in to comment.