From: Maxim Mamontov Date: Wed, 27 Jul 2011 11:43:31 +0000 (+0300) Subject: Back to good old static libs (no more .so-hell!) X-Git-Tag: 2.408-alpha~68 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/c2543dd1d46d0590c33ddbe275057c284f081d5a?ds=inline Back to good old static libs (no more .so-hell!) --- diff --git a/projects/stargazer/plugins/Makefile.in b/projects/stargazer/plugins/Makefile.in index 23ff1eb9..2b255304 100644 --- a/projects/stargazer/plugins/Makefile.in +++ b/projects/stargazer/plugins/Makefile.in @@ -11,7 +11,7 @@ LN = ln CXXFLAGS += -fPIC LDFLAGS += -shared -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) all: $(PROG) diff --git a/stglibs/Makefile.in b/stglibs/Makefile.in index e1084b7b..b4344254 100644 --- a/stglibs/Makefile.in +++ b/stglibs/Makefile.in @@ -4,29 +4,7 @@ include ../../Makefile.conf -PROG = lib$(LIB_NAME).so - -ifeq ($(PROT), on) -DEFS += -DLINPROT -endif - -ifeq ($(DEMO), on) -DEFS += -DDEMO -endif - -ifeq ($(OS), bsd) - ifeq ($(PROT), on) - DEFS += -DFREEBDSPROT - endif -MAKE = gmake -endif - -ifeq ($(OS), bsd5) - ifeq ($(PROT), on) - DEFS += -DFREEBDSPROT - endif -MAKE = gmake -endif +PROG = lib$(LIB_NAME).a ifeq ($(STG_TIME), yes) DEFS += -DSTG_TIME @@ -43,18 +21,16 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) INST_INCS = $(addprefix $(DIR_INCLUDE)/, $(notdir $(INCS))) INST_LIBS = $(DIR_LIB)/lib$(LIB_NAME) -CXXFLAGS += -fPIC $(DEFS) -LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg +CXXFLAGS += -fPIC +CFLAGS += -fPIC -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) all: $(PROG) $(PROG): $(OBJS) $(STGLIBS) - $(CXX) $(LDFLAGS) -Wl,-soname,$(PROG) $^ $(LIBS) -o $(PROG) -L $(DIR_LIB) ar rc lib$(LIB_NAME).a $(OBJS) ranlib lib$(LIB_NAME).a - cp *.so $(DIR_LIB) cp *.a $(DIR_LIB) includes: $(INCS) diff --git a/stglibs/smux.lib/Makefile b/stglibs/smux.lib/Makefile index 450c6283..9663b8cd 100644 --- a/stglibs/smux.lib/Makefile +++ b/stglibs/smux.lib/Makefile @@ -6,13 +6,15 @@ SRCS = $(wildcard *.c) INCS = $(wildcard *.h) -ASN1_SOURCES = RFC1213-MIB.asn1 \ - RFC1155-SMI.asn1 \ - RFC1157-SNMP.asn1 \ - SMUX.asn1 +.PHONY: asn1 -asn1: $(ASN1_SOURCES) - asn1c -fskeletons-copy -fcompound-names $^ - rm Makefile.am.sample +#ASN1_SOURCES = RFC1213-MIB.asn1 \ +# RFC1155-SMI.asn1 \ +# RFC1157-SNMP.asn1 \ +# SMUX.asn1 + +#asn1: $(ASN1_SOURCES) +# asn1c -fskeletons-copy -fcompound-names $^ +# rm Makefile.am.sample include ../Makefile.in