Luna/tests/libc/Makefile

15 lines
483 B
Makefile

TESTDIR := $(LUNA_ROOT)/tests/libc
DESTDIR := $(LUNA_ROOT)/initrd/bin
build:
@mkdir -p $(TESTDIR)/bin
$(LUNA_ROOT)/tools/sync-libc.sh
$(CC) $(TESTDIR)/string.c $(TESTDIR)/stdlib.c $(TESTDIR)/Test.c -I$(LUNA_ROOT)/tests -o $(TESTDIR)/bin/test-libc -Wall -Wextra -Wno-stringop-overread -Werror
install:
$(LUNA_ROOT)/tools/clean.sh
@mkdir -p $(DESTDIR)
cp $(TESTDIR)/bin/test-libc $(DESTDIR)/test-libc
test:
CFLAGS="-DRUN_TEST_AS_INIT=/bin/test-libc" $(LUNA_ROOT)/tools/run.sh