]> git.stg.codes - stg.git/blobdiff - stglibs/Makefile.in
stg-2.409 pre-merge.
[stg.git] / stglibs / Makefile.in
index 5bbc24e5bdfe2bf8d710dd06a0b862ab2841ce71..11dfcfb17b93ead67ffdb6c7da36fcec377aa9b1 100644 (file)
@@ -35,10 +35,15 @@ clean:
        rm -f deps $(PROG) *.o *.a *.so tags *.*~ 
 
 install: $(PROG)
+ifeq ($(DEBUG), yes)
+       mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
+       install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+else
        mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
        install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+endif
        mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
-       install -m $(DATA_MODE) -o $(OWNER) $(INCS) $(PREFIX)/usr/include/stg/
+       install -m $(DATA_MODE) -o $(OWNER) $(addprefix include/stg/,$(INCS)) $(PREFIX)/usr/include/stg/
 
 uninstall:
        rm -f $(PREFIX)/usr/lib/stg/$(PROG)
@@ -58,12 +63,12 @@ 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) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
-           echo -e '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
+           printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
          else\
            echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
-           echo -e '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\
+           printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\
          fi;\
        done