gbasys
annotate Makefile @ 12:a6ddf338a111
line clipping
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 01 Feb 2016 04:41:27 +0200 |
parents | 1807781b4503 |
children |
rev | line source |
---|---|
nuclear@0 | 1 PREFIX = /usr/local/gba |
nuclear@0 | 2 |
nuclear@0 | 3 src = $(wildcard src/*.c) |
nuclear@0 | 4 obj = $(src:.c=.o) |
nuclear@0 | 5 liba = libgbasys.a |
nuclear@0 | 6 |
nuclear@8 | 7 ARCH = arm-none-eabi |
nuclear@5 | 8 |
nuclear@5 | 9 CPP = $(ARCH)-cpp |
nuclear@5 | 10 CC = $(ARCH)-gcc |
nuclear@5 | 11 AS = $(ARCH)-as |
nuclear@5 | 12 AR = $(ARCH)-ar |
nuclear@0 | 13 |
nuclear@0 | 14 CFLAGS = -pedantic -marm -mcpu=arm7tdmi -Isrc |
nuclear@0 | 15 |
nuclear@0 | 16 $(liba): $(obj) |
nuclear@0 | 17 $(AR) rcs $@ $(obj) |
nuclear@0 | 18 |
nuclear@0 | 19 -include $(obj:.o=.d) |
nuclear@0 | 20 |
nuclear@0 | 21 %.d: %.c |
nuclear@0 | 22 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@ |
nuclear@0 | 23 |
nuclear@0 | 24 .PHONY: clean |
nuclear@0 | 25 clean: |
nuclear@0 | 26 rm -f $(obj) $(liba) |
nuclear@0 | 27 |
nuclear@0 | 28 .PHONY: install |
nuclear@0 | 29 install: $(liba) |
nuclear@0 | 30 mkdir -p $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/gbasys |
nuclear@0 | 31 cp $(liba) $(DESTDIR)$(PREFIX)/lib/$(liba) |
nuclear@0 | 32 cp $(hdr) $(DESTDIR)$(PREFIX)/include/gbasys/ |
nuclear@0 | 33 |
nuclear@0 | 34 .PHONY: uninstall |
nuclear@0 | 35 uninstall: |
nuclear@0 | 36 rm -f $(DESTDIR)$(PREFIX)/lib/$(liba) |
nuclear@0 | 37 rm -f $(DESTDIR)$(PREFIX)/include/gbasys/*.h |
nuclear@0 | 38 rmdir $(DESTDIR)$(PREFIX)/include/gbasys |