summaryrefslogtreecommitdiff
path: root/Base/res/devel/templates/cpp-gui.postcreate
blob: 141dd4d3b3bf6b268586d6641654bea83ae2fa35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

echo > $2/Makefile <<-EOF
PROGRAM = $1
OBJS = main.o
CXXFLAGS = -g -std=c++2a
LDFLAGS = -lgui

all: \$(PROGRAM)

\$(PROGRAM): \$(OBJS)
	\$(CXX) \$(LDFLAGS) -o \$@ \$(OBJS)

%.o: %.cpp
	\$(CXX) \$(CXXFLAGS) -o \$@ -c \$<

clean:
	rm \$(OBJS) \$(PROGRAM)

run:
	./\$(PROGRAM)
EOF