mirror of
https://github.com/tat3r/a2m.git
synced 2024-11-14 11:46:39 +00:00
26 lines
441 B
Makefile
26 lines
441 B
Makefile
PROG := a2m
|
|
SRC := a2m.c
|
|
CC := cc
|
|
CFLAGS += -g -std=c99 -Wall
|
|
PREFIX ?= /usr/local
|
|
|
|
UNAME := $(shell sh -c 'uname -s 2>/dev/null')
|
|
|
|
ifeq ($(UNAME),Darwin)
|
|
CC := clang
|
|
CFLAGS += -Wunused-result -Wunused-value
|
|
LDFLAGS += -liconv
|
|
endif
|
|
|
|
default:
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROG)
|
|
|
|
.PHONY: install clean
|
|
|
|
install:
|
|
install -d 0755 $(PREFIX)/bin/
|
|
install -m 0755 $(PROG) $(PREFIX)/bin/$(PROG)
|
|
|
|
clean:
|
|
rm -rf $(PROG) $(PROG).dSYM
|