soap

simple xdg-open replacement with fallback
git clone git://git.2f30.org/soap
Log | Files | Refs | LICENSE

Makefile (878B)


      1 # soap - simple xdg-open replacement with fallback
      2 
      3 include config.mk
      4 
      5 SRC = soap.c
      6 OBJ = ${SRC:.c=.o}
      7 
      8 all: options soap
      9 
     10 options:
     11 	@echo soap build options:
     12 	@echo "CFLAGS   = ${CFLAGS}"
     13 	@echo "LDFLAGS  = ${LDFLAGS}"
     14 	@echo "CC       = ${CC}"
     15 
     16 .c.o:
     17 	@echo CC $<
     18 	@${CC} -c ${CFLAGS} $<
     19 
     20 ${OBJ}: config.h config.mk
     21 
     22 config.h:
     23 	@echo creating $@ from config.def.h
     24 	@cp config.def.h $@
     25 
     26 soap: ${OBJ}
     27 	@echo CC -o $@
     28 	@${CC} -o $@ ${OBJ} ${LDFLAGS}
     29 
     30 clean:
     31 	@echo cleaning
     32 	@rm -f soap ${OBJ}
     33 
     34 install: all
     35 	@test -f /usr/bin/xdg-open_ || (echo backing up to /usr/bin/xdg-open_; mv /usr/bin/xdg-open /usr/bin/xdg-open_)
     36 	@echo installing new xdg-open
     37 	@cp -f soap /usr/bin/xdg-open
     38 	@chmod 755 /usr/bin/xdg-open
     39 
     40 uninstall:
     41 	@echo moving xdg-open_ back into place
     42 	@(test -f /usr/bin/xdg-open_ && mv /usr/bin/xdg-open_ /usr/bin/xdg-open) || echo ERROR: xdg-open_ does not exist