gbasys
view Makefile @ 0:875ef6085efc
gbasys mercurial repository
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 04 Mar 2012 04:04:25 +0200 |
parents | |
children | c50064b181c2 |
line source
1 PREFIX = /usr/local/gba
3 src = $(wildcard src/*.c)
4 obj = $(src:.c=.o)
5 liba = libgbasys.a
7 CPP = arm-agb-elf-cpp
8 CC = arm-agb-elf-gcc
9 AS = arm-agb-elf-as
10 AR = arm-agb-elf-ar
12 CFLAGS = -pedantic -marm -mcpu=arm7tdmi -Isrc
14 $(liba): $(obj)
15 $(AR) rcs $@ $(obj)
17 -include $(obj:.o=.d)
19 %.d: %.c
20 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
22 .PHONY: clean
23 clean:
24 rm -f $(obj) $(liba)
26 .PHONY: install
27 install: $(liba)
28 mkdir -p $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/gbasys
29 cp $(liba) $(DESTDIR)$(PREFIX)/lib/$(liba)
30 cp $(hdr) $(DESTDIR)$(PREFIX)/include/gbasys/
32 .PHONY: uninstall
33 uninstall:
34 rm -f $(DESTDIR)$(PREFIX)/lib/$(liba)
35 rm -f $(DESTDIR)$(PREFIX)/include/gbasys/*.h
36 rmdir $(DESTDIR)$(PREFIX)/include/gbasys