archive

- Random tools & helpful resources for IRC
git clone git://git.acid.vegas/archive.git
Log | Files | Refs | Archive

Makefile (393B)

      1 PROG := bwu
      2 SRC := bwu.c
      3 CC := cc
      4 CFLAGS += -g -std=c99 -Wall
      5 LDFLAGS += -lm
      6 PREFIX ?= /usr/local
      7 
      8 UNAME := $(shell sh -c 'uname -s 2>/dev/null')
      9 
     10 ifeq ($(UNAME), Darwin)
     11 	CC := clang
     12 	CFLAGS += -Wunused-result -Wunused-value
     13 endif
     14 
     15 default:
     16 	$(CC) $(CFLAGS) $(SRC) -o $(PROG) $(LDFLAGS)
     17 
     18 .PHONY: install clean
     19 
     20 install:
     21 	cp $(PROG) $(PREFIX)/bin/$(PROG)
     22 
     23 clean:
     24 	rm -rf $(PROG) $(PROG).dSYM
     25