ladybird/AK/Tests/Makefile

36 lines
760 B
Makefile
Raw Normal View History

2020-01-01 13:16:40 -06:00
SHARED_TEST_SOURCES = \
../String.cpp \
../StringImpl.cpp \
../StringBuilder.cpp \
../StringView.cpp \
../LogStream.cpp \
../JsonValue.cpp \
../JsonParser.cpp \
../FileSystemPath.cpp \
../URL.cpp \
../Utf8View.cpp
2020-01-01 13:16:40 -06:00
SRCS = $(wildcard *.cpp)
SHARED_TEST_OBJS = ${SHARED_TEST_SOURCES:.cpp=.host.o}
OBJS = ${SRCS:.cpp=.host.o} $(SHARED_TEST_OBJS)
APPS = ${SRCS:.cpp=}
2020-01-01 13:16:40 -06:00
EXTRA_CLEAN = $(APPS) *.o
2020-01-01 13:16:40 -06:00
HOST_CXX = 1
2020-01-01 13:16:40 -06:00
include ../../Makefile.common
2020-01-01 13:16:40 -06:00
CXXFLAGS = -std=c++17 -Wall -Wextra -ggdb3 -O2 -I../ -I../../
2020-01-01 13:16:40 -06:00
APPS_RUN = $(addsuffix .run,$(APPS))
test: $(APPS) $(APPS_RUN)
$(APPS_RUN): %.run:
./$*
2020-01-01 13:16:40 -06:00
$(APPS): %: %$(OBJ_SUFFIX).o $(SHARED_TEST_OBJS)
@echo "LINK $@"
$(QUIET) $(CXX) -o $@ $< $(SHARED_TEST_OBJS) $(LDFLAGS)
2020-01-01 13:16:40 -06:00
all: | $(APPS) $(APPS_RUN)