-
Notifications
You must be signed in to change notification settings - Fork 1
/
GNUmakefile
47 lines (34 loc) · 1.26 KB
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
all: launcher example-c example-cpp example-single example-gui
ifeq ($(OS),Windows_NT)
launcher: launcher.c
gcc -s launcher.c -o launcher
winsi: launcher.c
gcc -c launcher.c -o winsi.o -DBUILD_DLL
gcc -shared -s -o winsi.dll winsi.o -Wl,--out-implib,libwinsi.dll.a
example-c: example.c ansipipe.h launcher
gcc -s example.c -o example-c
cp launcher.exe example-c.com
example-cpp: example.cpp ansipipe.h launcher
g++ -s example.cpp -o example-cpp
cp launcher.exe example-cpp.com
example-single: example-single.c launcher.c ansipipe.h
gcc -s example-single.c launcher.c -o example-single -D ANSIPIPE_SINGLE
example-gui: example-gui.cpp ansipipe.h launcher
g++ -s example-gui.cpp -o example-gui -fpermissive -mwindows
cp launcher.exe example-gui.com
clean:
rm *.exe *.com
else
launcher: launcher.c
gcc -s launcher.c -o launcher
example-c: example.c ansipipe.h launcher
gcc -s example.c -o example-c
example-cpp: example.cpp ansipipe.h launcher
g++ -s example.cpp -o example-cpp
example-single: example-single.c launcher.c ansipipe.h
gcc -s example-single.c launcher.c -o example-single -D ANSIPIPE_SINGLE
example-gui: example-gui.cpp ansipipe.h launcher
touch example-gui
clean:
rm launcher example-c example-cpp example-single example-gui
endif