makefiles uninstall
This commit is contained in:
parent
5bd4dcbd1e
commit
2a3632b69b
16
Makefile
16
Makefile
|
@ -1,3 +1,5 @@
|
|||
include Rules.make
|
||||
|
||||
SUBDIRS = src/sdl-instead stead games themes icon desktop doc languages
|
||||
|
||||
all:
|
||||
|
@ -11,8 +13,20 @@ clean:
|
|||
done;
|
||||
|
||||
install: all
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
@for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir install || exit 1; \
|
||||
done;
|
||||
else
|
||||
echo No install needed
|
||||
endif
|
||||
|
||||
|
||||
uninstall:
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
@for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir uninstall || exit 1; \
|
||||
done;
|
||||
$(RM) -rf $(STEADPATH)
|
||||
else
|
||||
echo No uninstall needed
|
||||
endif
|
||||
|
|
|
@ -9,14 +9,15 @@ ICONPATH=./icon
|
|||
LANGPATH=./languages
|
||||
DOCPATH=
|
||||
MANPATH=
|
||||
SYSTEMSETUP=no
|
||||
|
||||
LUA_CFLAGS=$(shell pkg-config --cflags lua5.1)
|
||||
LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
|
||||
|
||||
# for arch linux, fedora (may be others) use this
|
||||
#
|
||||
# LUA_CFLAGS=$(shell pkg-config --cflags lua)
|
||||
# LUA_LFLAGS=$(shell pkg-config --libs lua)
|
||||
LUA_CFLAGS=$(shell pkg-config --cflags lua)
|
||||
LUA_LFLAGS=$(shell pkg-config --libs lua)
|
||||
#
|
||||
|
||||
SDL_CFLAGS=$(shell sdl-config --cflags)
|
||||
|
@ -24,9 +25,11 @@ SDL_LFLAGS=$(shell sdl-config --libs) -lSDL_ttf -lSDL_mixer -lSDL_image
|
|||
|
||||
CFLAGS += -g -Wall -D_HAVE_ICONV
|
||||
|
||||
INSTALLD=echo
|
||||
INSTALL=echo
|
||||
EXE=
|
||||
INSTALLD=echo "Do not install standalone version!"
|
||||
INSTALLB=echo "Do not install standalone version!"
|
||||
INSTALL=echo "Do not install standalone version!"
|
||||
|
||||
EXE=
|
||||
PLATFORM=unix.c
|
||||
RESOURCES=
|
||||
RM=rm
|
||||
|
|
|
@ -10,6 +10,7 @@ ICONPATH=$(DESTDIR)$(PREFIX)/share/pixmaps
|
|||
DOCPATH=$(DESTDIR)$(PREFIX)/share/doc/instead
|
||||
LANGPATH=$(STEADPATH)/languages
|
||||
MANPATH=$(DESTDIR)$(PREFIX)/share/man/man6
|
||||
SYSTEMSETUP=yes
|
||||
|
||||
LUA_CFLAGS=$(shell pkg-config --cflags lua5.1)
|
||||
LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
|
||||
|
@ -26,8 +27,10 @@ SDL_LFLAGS=$(shell sdl-config --libs) -lSDL_ttf -lSDL_mixer -lSDL_image
|
|||
CFLAGS += -Wall -D_HAVE_ICONV
|
||||
|
||||
INSTALLD=install -d -m 0755
|
||||
INSTALL=install -m 0755
|
||||
INSTALLB=install -m 0755
|
||||
INSTALL=install -m 0644
|
||||
|
||||
EXE=
|
||||
PLATFORM=unix.c
|
||||
RESOURCES=
|
||||
|
||||
RM=rm
|
||||
|
|
|
@ -8,6 +8,12 @@ instead.desktop: instead.desktop.in
|
|||
cat instead.desktop.in | sed -e "s|@BIN|$(BIN)|g" > instead.desktop
|
||||
|
||||
install:
|
||||
install -d -m 0755 $(DESTDIR)$(PREFIX)/share/applications
|
||||
install -m 0644 instead.desktop $(DESTDIR)$(PREFIX)/share/applications/instead.desktop
|
||||
$(INSTALLD) $(DESTDIR)$(PREFIX)/share/applications
|
||||
$(INSTALL) instead.desktop $(DESTDIR)$(PREFIX)/share/applications/instead.desktop
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) $(DESTDIR)$(PREFIX)/share/applications/instead.desktop
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
|
16
doc/Makefile
16
doc/Makefile
|
@ -2,7 +2,15 @@ include ../Rules.make
|
|||
clean:
|
||||
all:
|
||||
install:
|
||||
install -d -m0755 $(DOCPATH)
|
||||
install -m0644 *.jpg *.html *.txt $(DOCPATH)
|
||||
install -d -m0755 $(MANPATH)
|
||||
install -m0644 *.6 $(MANPATH)
|
||||
$(INSTALLD) $(DOCPATH)
|
||||
$(INSTALL) *.jpg *.html *.txt $(DOCPATH)
|
||||
$(INSTALLD) $(MANPATH)
|
||||
$(INSTALL) *.6 $(MANPATH)
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) -rf $(DOCPATH)
|
||||
$(RM) $(MANPATH)/instead.*
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
|
|
@ -1,10 +1,20 @@
|
|||
include ../Rules.make
|
||||
all:
|
||||
install:
|
||||
install -d -m0755 $(GAMESPATH)
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
$(INSTALLD) $(GAMESPATH)
|
||||
for f in *; do \
|
||||
if [ ! -d $$f ]; then continue; fi;\
|
||||
install -d -m0755 $(GAMESPATH)/$$f;\
|
||||
$(INSTALLD) $(GAMESPATH)/$$f; \
|
||||
tar --exclude=".svn" -c -C $$f . | tar -x -C $(GAMESPATH)/$$f;\
|
||||
done
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) -rf $(GAMESPATH)
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
|
|
@ -2,6 +2,12 @@ include ../Rules.make
|
|||
clean:
|
||||
all:
|
||||
install:
|
||||
install -d -m0755 $(ICONPATH)
|
||||
install -m0644 sdl_instead.png $(ICONPATH)
|
||||
$(INSTALLD) $(ICONPATH)
|
||||
$(INSTALL) sdl_instead.png $(ICONPATH)
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) $(ICONPATH)/sdl_instead.png
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
|
|
@ -2,7 +2,14 @@ include ../Rules.make
|
|||
clean:
|
||||
all:
|
||||
install:
|
||||
install -d -m0755 $(LANGPATH)
|
||||
$(INSTALLD) $(LANGPATH)
|
||||
for f in *.ini; do \
|
||||
install -m0644 $$f $(LANGPATH)/$$f;\
|
||||
$(INSTALL) $$f $(LANGPATH)/$$f;\
|
||||
done
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) -rf $(LANGPATH)
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
|
|
@ -4,8 +4,14 @@ all: instead
|
|||
instead: instead.c rline.c
|
||||
$(CC) $(CFLAGS) -DSTEAD_PATH=\"${STEADPATH}/\" instead.c $(LUA_CFLAGS) rline.c $(LUA_LFLAGS) -lncurses -lreadline -o instead
|
||||
clean:
|
||||
rm -rf *.o instead
|
||||
$(RM) -rf *.o instead
|
||||
install:
|
||||
install -d -m 0755 $(BIN)
|
||||
install -m 0755 instead $(BIN)/instead
|
||||
$(INSTALLD) $(BIN)
|
||||
$(INSTALLB) instead $(BIN)/instead
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) $(BIN)/instead
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
|
|
@ -18,7 +18,14 @@ sdl-instead$(EXE): $(OBJ) $(RESOURCES)
|
|||
|
||||
install:
|
||||
$(INSTALLD) $(BIN)
|
||||
$(INSTALL) sdl-instead$(EXE) $(BIN)/sdl-instead$(EXE)
|
||||
$(INSTALLB) sdl-instead$(EXE) $(BIN)/sdl-instead$(EXE)
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) $(BIN)/sdl-instead$(EXE)
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(RM) -f *.o sdl-instead$(EXE)
|
||||
|
|
|
@ -3,7 +3,14 @@ clean:
|
|||
all: stead.lua
|
||||
|
||||
install:
|
||||
install -m 0755 -d $(STEADPATH)
|
||||
install -m 0644 stead.lua $(STEADPATH)/stead.lua
|
||||
install -m 0644 gui.lua $(STEADPATH)/gui.lua
|
||||
$(INSTALLD) $(STEADPATH)
|
||||
$(INSTALL) stead.lua $(STEADPATH)/stead.lua
|
||||
$(INSTALL) gui.lua $(STEADPATH)/gui.lua
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) $(STEADPATH)/stead.lua
|
||||
$(RM) $(STEADPATH)/gui.lua
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
|
|
@ -2,10 +2,18 @@ include ../Rules.make
|
|||
clean:
|
||||
all:
|
||||
install:
|
||||
install -d -m0755 $(THEMESPATH)
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
$(INSTALLD) $(THEMESPATH)
|
||||
for f in *; do \
|
||||
if [ ! -d $$f ]; then continue; fi;\
|
||||
install -d -m0755 $(THEMESPATH)/$$f;\
|
||||
$(INSTALLD) $(THEMESPATH)/$$f;\
|
||||
tar --exclude=".svn" -c -C $$f . | tar -x -C $(THEMESPATH)/$$f;\
|
||||
done
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEMSETUP), yes)
|
||||
uninstall:
|
||||
$(RM) -rf $(THEMESPATH)
|
||||
else
|
||||
uninstall:
|
||||
endif
|
||||
|
|
Reference in a new issue