gbasys
view Makefile @ 8:047c61960005
- added bg2 matrix support
- changed some stupid const pointers to register addresses to hardcoded compile-time defines
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 22 Jun 2014 06:26:11 +0300 |
parents | 1807781b4503 |
children |
line source
1 PREFIX = /usr/local/gba
3 src = $(wildcard src/*.c)
4 obj = $(src:.c=.o)
5 liba = libgbasys.a
7 ARCH = arm-none-eabi
9 CPP = $(ARCH)-cpp
10 CC = $(ARCH)-gcc
11 AS = $(ARCH)-as
12 AR = $(ARCH)-ar
14 CFLAGS = -pedantic -marm -mcpu=arm7tdmi -Isrc
16 $(liba): $(obj)
17 $(AR) rcs $@ $(obj)
19 -include $(obj:.o=.d)
21 %.d: %.c
22 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
24 .PHONY: clean
25 clean:
26 rm -f $(obj) $(liba)
28 .PHONY: install
29 install: $(liba)
30 mkdir -p $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/gbasys
31 cp $(liba) $(DESTDIR)$(PREFIX)/lib/$(liba)
32 cp $(hdr) $(DESTDIR)$(PREFIX)/include/gbasys/
34 .PHONY: uninstall
35 uninstall:
36 rm -f $(DESTDIR)$(PREFIX)/lib/$(liba)
37 rm -f $(DESTDIR)$(PREFIX)/include/gbasys/*.h
38 rmdir $(DESTDIR)$(PREFIX)/include/gbasys