build libSDL2_test too with Makefile.minimal

This commit is contained in:
Ozkan Sezer 2021-11-14 01:10:32 +03:00
parent eb98ff4740
commit 780f6cbd38
1 changed files with 12 additions and 3 deletions

View File

@ -6,6 +6,8 @@ AR = ar
RANLIB = ranlib RANLIB = ranlib
TARGET = libSDL2.a TARGET = libSDL2.a
TESTTARGET = libSDL2_test.a
SOURCES = \ SOURCES = \
src/*.c \ src/*.c \
src/atomic/*.c \ src/atomic/*.c \
@ -40,13 +42,20 @@ SOURCES = \
src/video/yuv2rgb/*.c \ src/video/yuv2rgb/*.c \
src/video/dummy/*.c \ src/video/dummy/*.c \
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g') TSOURCES = src/test/*.c
all: $(TARGET) OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
TOBJECTS= $(shell echo $(TSOURCES) | sed -e 's,\.c,\.o,g')
all: $(TARGET) $(TESTTARGET)
$(TARGET): $(OBJECTS) $(TARGET): $(OBJECTS)
$(AR) crv $@ $^ $(AR) crv $@ $^
$(RANLIB) $@ $(RANLIB) $@
$(TESTTARGET): $(TOBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
clean: clean:
rm -f $(TARGET) $(OBJECTS) rm -f $(TARGET) $(TESTTARGET) $(OBJECTS) $(TOBJECTS)