X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/bfb8d7685e998fbcafcb5315b3c50a77760b7e48..04d7ddb9da330539a3026cd26b4ba6d0ee82a395:/projects/stargazer/plugins/Makefile.in diff --git a/projects/stargazer/plugins/Makefile.in b/projects/stargazer/plugins/Makefile.in index 961ba3aa..6dd8d781 100644 --- a/projects/stargazer/plugins/Makefile.in +++ b/projects/stargazer/plugins/Makefile.in @@ -8,15 +8,18 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) LN = ln -CXXFLAGS += -fPIC -CFLAGS += -fPIC -LDFLAGS += -shared -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg +STGLIBS_INCS = $(addprefix -I ../../../../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) +STGLIBS_LIBS = $(addprefix -L ../../../../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -vpath %.a $(DIR_LIB) +LIBS += $(addprefix -lstg,$(STGLIBS)) + +CXXFLAGS += -fPIC $(STGLIBS_INCS) +CFLAGS += -fPIC $(STGLIBS_INCS) +LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg $(STGLIBS_LIBS) all: $(PROG) -$(PROG): $(OBJS) $(STGLIBS) +$(PROG): $(OBJS) $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG) $(LN) -fs "`pwd`/$(PROG)" $(DIR_MOD)/$(PROG) @@ -40,7 +43,7 @@ deps: $(SRCS) ../../../../../Makefile.conf @>deps ;\ for file in $(SRCS); do\ echo "$$file" | grep ".c$$" > /dev/null;\ - if [ $$? == 0 ];\ + if [ $$? -eq 0 ];\ then\ echo "`$(CC) $(CFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\ echo -e '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\