gbasys

view Makefile @ 10:9d05431f4a16

fixed GET_R/GET_B macros which where reversed
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 30 Jan 2016 05:23:48 +0200
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