X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d614b065a35df8f3adaa4a4afc0d7a6cb02eef97..a9f633a23d4fdd32c3185d13f8987a8ff7a8f82d:/projects/stargazer/plugins/Makefile.in?ds=inline diff --git a/projects/stargazer/plugins/Makefile.in b/projects/stargazer/plugins/Makefile.in index 87e0c4ce..961ba3aa 100644 --- a/projects/stargazer/plugins/Makefile.in +++ b/projects/stargazer/plugins/Makefile.in @@ -9,9 +9,10 @@ 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 -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) all: $(PROG) @@ -22,7 +23,7 @@ $(PROG): $(OBJS) $(STGLIBS) clean: rm -f deps $(PROG) *.o tags *.*~ -install: +install: $(PROG) mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG) @@ -38,6 +39,13 @@ endif deps: $(SRCS) ../../../../../Makefile.conf @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\ - echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? == 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\ + echo -e '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\ + echo -e '\t$$(CXX) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\ + fi;\ done