a2m/Makefile

26 lines
441 B
Makefile
Raw Permalink Normal View History

2016-09-07 00:01:56 +00:00
PROG := a2m
SRC := a2m.c
CC := cc
2016-09-10 11:00:26 +00:00
CFLAGS += -g -std=c99 -Wall
2018-07-14 10:04:33 +00:00
PREFIX ?= /usr/local
2016-09-07 00:01:56 +00:00
2018-06-17 23:39:57 +00:00
UNAME := $(shell sh -c 'uname -s 2>/dev/null')
2016-09-07 00:01:56 +00:00
ifeq ($(UNAME),Darwin)
CC := clang
CFLAGS += -Wunused-result -Wunused-value
LDFLAGS += -liconv
endif
default:
$(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROG)
2018-07-14 10:04:33 +00:00
.PHONY: install clean
install:
install -d 0755 $(PREFIX)/bin/
install -m 0755 $(PROG) $(PREFIX)/bin/$(PROG)
2016-09-07 00:01:56 +00:00
clean:
2016-09-10 11:00:26 +00:00
rm -rf $(PROG) $(PROG).dSYM