wut/crt/Makefile

29 lines
502 B
Makefile
Raw Normal View History

2016-07-06 22:06:57 +02:00
include $(CURDIR)/../rules/ppc.mk
2015-12-27 03:10:38 +01:00
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 $(INSTALLDIR)/lib
@cp -f *.a $(INSTALLDIR)/lib
2015-12-27 03:10:38 +01:00
%.o: %.c
@echo "[CC] $(notdir $<)"
@$(CC) $(CFLAGS) -c $< -o $@
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