mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00

Now that oss-fuzz is on a clang commit > the 17.x release candidates, we can start looking at some shiny new features to enable.
28 lines
518 B
Text
28 lines
518 B
Text
#!/bin/Shell
|
|
|
|
# $1: Project name, filesystem safe
|
|
# $2: Project full path
|
|
# $3: Project name, namespace safe
|
|
|
|
# FIXME: Use a single sed command once we support that.
|
|
sed -i "s/\\\$LibName/$3/g" $2/Class1.h
|
|
sed -i "s/\\\$LibName/$3/g" $2/Class1.cpp
|
|
|
|
# Generate Makefile
|
|
echo > $2/Makefile <<-EOF
|
|
LIBRARY = $1.so
|
|
OBJS = Class1.o
|
|
CXXFLAGS = -g -std=c++23
|
|
|
|
all: \$(LIBRARY)
|
|
|
|
\$(LIBRARY): \$(OBJS)
|
|
\$(CXX) -shared -o \$@ \$(OBJS)
|
|
|
|
%.o: %.cpp
|
|
\$(CXX) \$(CXXFLAGS) -fPIC -o \$@ -c \$<
|
|
|
|
clean:
|
|
rm \$(OBJS) \$(LIBRARY)
|
|
|
|
EOF
|