#all: # -@echo "Please use ./configure first. Thank you." # #distclean: # make -f Makefile.in distclean AR := "$(shell (which arm-elf-ar arm-none-eabi-ar arm-linux-gnueabi-ar | head -1) 2>/dev/null)" GCC = nspire-gcc GCCFLAGS = -Os -nostdlib LD = nspire-ld LDFLAGS = -nostdlib OBJCOPY := "$(shell (which arm-elf-objcopy arm-none-eabi-objcopy arm-linux-gnueabi-objcopy | head -1) 2>/dev/null)" LIB = libz.a DISTDIR = . vpath %.a $(DISTDIR) OBJS = zutil.o adler32.o crc32.o deflate.o inflate.o infback.o inffast.o inftrees.o trees.o all: static $(LIB) %.o: %.c $(GCC) $(GCCFLAGS) -c $< %.elf: %.o $(LD) $(LDFLAGS) $^ -o $@ static: @mkdir -p $(DISTDIR) $(LIB): $(OBJS) $(AR) rcs $(DISTDIR)/$(LIB) $^ clean: rm -rf *.o *.elf *.a rm -f $(DISTDIR)/$(LIB)