wut/crt/Makefile

26 lines
454 B
Makefile
Raw Normal View History

2015-12-27 03:10:38 +01:00
WUT_ROOT := $(CURDIR)/..
include $(WUT_ROOT)/rules/ppc.mk
CFILES := $(wildcard *.c)
SFILES := $(wildcard *.S)
OFILES := $(CFILES:.c=.o) $(SFILES:.S=.o)
OUTPUT := libcrt
2015-12-27 03:10:38 +01:00
all: $(OUTPUT).a $(OFILES)
2015-12-27 03:10:38 +01:00
clean:
@echo "[RM] $(notdir $(OUTPUT))"
@rm -f $(OFILES) $(OUTPUT).a
2015-12-27 03:10:38 +01:00
install: all
@mkdir -p $(WUT_ROOT)/lib
@cp -f *.a $(WUT_ROOT)/lib
2015-12-27 03:10:38 +01:00
%.o: %.S
@echo "[CC] $(notdir $<)"
@$(CC) $(CFLAGS) -c $< -o $@
$(OUTPUT).a: $(OFILES)
2015-12-27 03:10:38 +01:00
.PHONY: all clean