2022-10-16 13:31:58 +00:00
|
|
|
TESTDIR := $(LUNA_ROOT)/tests/libc
|
|
|
|
DESTDIR := $(LUNA_ROOT)/initrd/bin
|
|
|
|
|
|
|
|
build:
|
|
|
|
@mkdir -p $(TESTDIR)/bin
|
|
|
|
$(LUNA_ROOT)/tools/sync-libc.sh
|
2022-10-16 14:00:14 +00:00
|
|
|
$(CC) $(TESTDIR)/string.c $(TESTDIR)/Test.c -I$(LUNA_ROOT)/tests -o $(TESTDIR)/bin/test-libc -Wall -Wextra -Wno-stringop-overread -Werror
|
2022-10-16 13:31:58 +00:00
|
|
|
|
|
|
|
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
|