blob: c492ffec0b16bccaad441cb26cb771add9ca6d95 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
include ../common.mk
TARGET = ../libpsxspu.a
CFILES = $(notdir $(wildcard ./*.c))
AFILES = $(notdir $(wildcard ./*.s))
OFILES = $(addprefix build/,$(CFILES:.c=.o) $(AFILES:.s=.o))
CFLAGS = -g -O2 -msoft-float -fdata-sections -ffunction-sections -Wa,--strip-local-absolute
AFLAGS = -g -msoft-float -strip-local-absolute
CC = $(PREFIX)gcc
AS = $(PREFIX)as
AR = $(PREFIX)ar
RANLIB = $(PREFIX)ranlib
all: $(TARGET)
$(TARGET): $(OFILES)
$(AR) cr $(TARGET) $(OFILES)
$(RANLIB) $(TARGET)
build/%.o: %.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
build/%.o: %.s
@mkdir -p $(dir $@)
$(AS) $(AFLAGS) $(INCLUDE) $< -o $@
clean:
rm -Rf build $(TARGET)
|