Fix some LINKAGE=static compile issues:

- Makefile circularity by fixing .so suffix
- simplify example/main Makefile
This commit is contained in:
Olof hagsand 2021-09-26 11:06:41 +02:00
parent c00162aec1
commit 5a875e3152
11 changed files with 34 additions and 30 deletions

View file

@ -57,7 +57,7 @@ CFLAGS = @CFLAGS@
ifeq ($(LINKAGE),dynamic)
CFLAGS += -fPIC
endif
SH_SUFFIX = @SH_SUFFIX@
SH_SUFFIX = .so
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@
INSTALLFLAGS = @INSTALLFLAGS@
@ -239,6 +239,7 @@ build.c:
date +"const char CLIXON_BUILDSTR[$(DATELEN)]=\"%Y.%m.%d %H:%M by `whoami` on `hostname`"\"\; >> build.c;
echo "const char CLIXON_VERSION[64]=\"$(CLIXON_VERSION)\""\; >> build.c;
# Note: will always be remade since GENOBS is date dependent
$(MYLIBDYNAMIC) : $(GENOBJS) $(OBJS)
ifeq ($(HOST_VENDOR),apple)
$(CC) $(LDFLAGS) -shared -o $@ $(GENOBJS) $(OBJS) $(LIBS) -undefined dynamic_lookup -o $@