ticl

tiny irc channel linker
git clone git://git.ircforever.org/ticl
Log | Files | Refs | Submodules | README | LICENSE

Makefile (750B)


      1 # This work is dedicated to the public domain.
      2 # See COPYING file for more information.
      3 
      4 include config.mk
      5 
      6 OUT = ticl
      7 SRC = main.c htable.c
      8 OBJ = $(SRC:.c=.o)
      9 
     10 all: clean $(OUT)
     11 
     12 .c.o:
     13 	$(CC) -c $(CFLAGS) $<
     14 
     15 $(OUT): $(OBJ)
     16 	$(CC) -o $@ $(OBJ) $(LDFLAGS)
     17 
     18 clean:
     19 	rm -f $(OUT) $(OBJ) $(OUT)-*.tar.gz
     20 
     21 dist: clean
     22 	mkdir -p $(OUT)-$(VERSION)
     23 	cp -R README COPYING Makefile config.mk htable.h util.c $(SRC)\
     24 		$(OUT)-$(VERSION)
     25 	tar -cf	$(OUT)-$(VERSION).tar $(OUT)-$(VERSION)
     26 	gzip $(OUT)-$(VERSION).tar
     27 	rm -rf $(OUT)-$(VERSION)
     28 
     29 install: all
     30 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     31 	cp -f $(OUT) $(DESTDIR)$(PREFIX)/bin
     32 	chmod 755 $(DESTDIR)$(PREFIX)/bin/$(OUT)
     33 
     34 uninstall:
     35 	rm -f $(DESTDIR)$(PREFIX)/bin/$(OUT)
     36 
     37 .PHONY: all clean dist install uninstall