-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgenerate.bat
More file actions
40 lines (39 loc) · 1.36 KB
/
generate.bat
File metadata and controls
40 lines (39 loc) · 1.36 KB
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
@echo off
set /p name=Enter your name:
mkdir "%name%"
cd "%name%"
mkdir subprojects
mklink /D subprojects\dynamic-typed ..\dynamic-typed
mklink /D subprojects\logging ..\logging
set /p lang=Select a language [cpp|default= c]:
if /i "%lang%"=="cpp" (
echo src = # your files>>Makefile
echo deps = subprojects/dynamic-typed/libdynamic++.so, subprojects/logging/liblogging.so]>>Makefile
echo.>>Makefile
echo all:>>Makefile
echo g++ -Wall -Wextra $(src) $(deps) -shared -o lib%name%-db++.so>>Makefile
echo test:>>Makefile
echo.>>Makefile
echo g++ -o demo test.cpp lib%name%-db++.so $(deps)>>Makefile
echo #include /* "your files" */>mydb.h
echo #include "mydb.h" >>test.cpp
echo. >>test.cpp
echo int main() { >>test.cpp
echo return 0; >>test.cpp
echo } >>test.cpp
) else (
echo src = # your files>>Makefile
echo deps = subprojects/dynamic-typed/libdynamic.so, subprojects/logging/liblogging.so]>>Makefile
echo.>>Makefile
echo all:>>Makefile
echo gcc -Wall -Wextra $(src) $(deps) -shared -o lib%name%-db.so>>Makefile
echo test:>>Makefile
echo.>>Makefile
echo gcc -o demo test.c lib%name%-db.so $(deps)>>Makefile
echo #include /* "your files" */>mydb.h
echo #include "mydb.h" >>test.c
echo. >>test.c
echo int main() { >>test.c
echo return 0; >>test.c
echo } >>test.c
)