mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
22 lines
297 B
Bash
22 lines
297 B
Bash
#!/bin/sh
|
|
|
|
echo > $2/Makefile <<-EOF
|
|
PROGRAM = $1
|
|
OBJS = main.o
|
|
CXXFLAGS = -g -std=c++2a
|
|
LDFLAGS = -lgui -lgcc_s
|
|
|
|
all: \$(PROGRAM)
|
|
|
|
\$(PROGRAM): \$(OBJS)
|
|
\$(CXX) \$(LDFLAGS) -o \$@ \$(OBJS)
|
|
|
|
%.o: %.cpp
|
|
\$(CXX) \$(CXXFLAGS) -o \$@ -c \$<
|
|
|
|
clean:
|
|
rm \$(OBJS) \$(PROGRAM)
|
|
|
|
run:
|
|
./\$(PROGRAM)
|
|
EOF
|