gbasys
annotate Makefile @ 4:5c6cdef01292
added .hgignore
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 08 Mar 2012 14:38:51 +0200 |
parents | 875ef6085efc |
children | 1807781b4503 |
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@1 | 7 CPP = arm-eabi-cpp |
nuclear@1 | 8 CC = arm-eabi-gcc |
nuclear@1 | 9 AS = arm-eabi-as |
nuclear@1 | 10 AR = arm-eabi-ar |
nuclear@0 | 11 |
nuclear@0 | 12 CFLAGS = -pedantic -marm -mcpu=arm7tdmi -Isrc |
nuclear@0 | 13 |
nuclear@0 | 14 $(liba): $(obj) |
nuclear@0 | 15 $(AR) rcs $@ $(obj) |
nuclear@0 | 16 |
nuclear@0 | 17 -include $(obj:.o=.d) |
nuclear@0 | 18 |
nuclear@0 | 19 %.d: %.c |
nuclear@0 | 20 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@ |
nuclear@0 | 21 |
nuclear@0 | 22 .PHONY: clean |
nuclear@0 | 23 clean: |
nuclear@0 | 24 rm -f $(obj) $(liba) |
nuclear@0 | 25 |
nuclear@0 | 26 .PHONY: install |
nuclear@0 | 27 install: $(liba) |
nuclear@0 | 28 mkdir -p $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/gbasys |
nuclear@0 | 29 cp $(liba) $(DESTDIR)$(PREFIX)/lib/$(liba) |
nuclear@0 | 30 cp $(hdr) $(DESTDIR)$(PREFIX)/include/gbasys/ |
nuclear@0 | 31 |
nuclear@0 | 32 .PHONY: uninstall |
nuclear@0 | 33 uninstall: |
nuclear@0 | 34 rm -f $(DESTDIR)$(PREFIX)/lib/$(liba) |
nuclear@0 | 35 rm -f $(DESTDIR)$(PREFIX)/include/gbasys/*.h |
nuclear@0 | 36 rmdir $(DESTDIR)$(PREFIX)/include/gbasys |