1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:17:35 +00:00

LibHTML: Start working on a simple HTML library.

I'd like to have rich text, and we might as well use HTML for that. :^)
This commit is contained in:
Andreas Kling 2019-06-15 18:55:47 +02:00
parent 01d1aee922
commit a67e823838
19 changed files with 329 additions and 0 deletions

42
LibHTML/Makefile Normal file
View file

@ -0,0 +1,42 @@
include ../Makefile.common
LIBHTML_OBJS = \
Node.o \
ParentNode.o \
Element.o \
Document.o \
Text.o \
Parser.o \
Dump.o
TEST_OBJS = test.o
TEST_PROGRAM = tho
OBJS = $(LIBHTML_OBJS) $(TEST_OBJS)
LIBRARY = libhtml.a
DEFINES += -DUSERLAND
all: $(LIBRARY) $(TEST_PROGRAM)
$(TEST_PROGRAM): $(TEST_OBJS) $(LIBRARY)
$(LD) -o $@ $(LDFLAGS) -L. $(TEST_OBJS) -lhtml -lgui -lcore -lc
$(LIBRARY): $(LIBHTML_OBJS)
@echo "LIB $@"; $(AR) rcs $@ $(LIBHTML_OBJS)
.cpp.o:
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
-include $(OBJS:%.o=%.d)
clean:
@echo "CLEAN"; rm -f $(TEST_PROGRAM) $(LIBRARY) $(OBJS) *.d
install: $(LIBRARY)
mkdir -p ../Root/usr/include/LibHTML
# Copy headers
rsync -r -a --include '*/' --include '*.h' --exclude '*' . ../Root/usr/include/LibHTML
# Install the library
cp $(LIBRARY) ../Root/usr/lib