nuclear@0: PREFIX = /usr/local/gba nuclear@0: nuclear@0: src = $(wildcard src/*.c) nuclear@0: obj = $(src:.c=.o) nuclear@0: liba = libgbasys.a nuclear@0: nuclear@5: ARCH = arm-eabi nuclear@5: nuclear@5: CPP = $(ARCH)-cpp nuclear@5: CC = $(ARCH)-gcc nuclear@5: AS = $(ARCH)-as nuclear@5: AR = $(ARCH)-ar nuclear@0: nuclear@0: CFLAGS = -pedantic -marm -mcpu=arm7tdmi -Isrc nuclear@0: nuclear@0: $(liba): $(obj) nuclear@0: $(AR) rcs $@ $(obj) nuclear@0: nuclear@0: -include $(obj:.o=.d) nuclear@0: nuclear@0: %.d: %.c nuclear@0: @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@ nuclear@0: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(liba) nuclear@0: nuclear@0: .PHONY: install nuclear@0: install: $(liba) nuclear@0: mkdir -p $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/gbasys nuclear@0: cp $(liba) $(DESTDIR)$(PREFIX)/lib/$(liba) nuclear@0: cp $(hdr) $(DESTDIR)$(PREFIX)/include/gbasys/ nuclear@0: nuclear@0: .PHONY: uninstall nuclear@0: uninstall: nuclear@0: rm -f $(DESTDIR)$(PREFIX)/lib/$(liba) nuclear@0: rm -f $(DESTDIR)$(PREFIX)/include/gbasys/*.h nuclear@0: rmdir $(DESTDIR)$(PREFIX)/include/gbasys