Sane defaults
This commit is contained in:
		
						commit
						9218754f23
					
				
					 9 changed files with 118 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					build
 | 
				
			||||||
							
								
								
									
										20
									
								
								.vscode/c_cpp_properties.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								.vscode/c_cpp_properties.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,20 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "env": {
 | 
				
			||||||
 | 
					        "defaultIncludePath": [
 | 
				
			||||||
 | 
					            "${workspaceFolder}/src"
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "configurations": [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "Luker",
 | 
				
			||||||
 | 
					            "includePath": [
 | 
				
			||||||
 | 
					                "${defaultIncludePath}"
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					            "intelliSenseMode": "linux-gcc-x64",
 | 
				
			||||||
 | 
					            "compilerPath": "/usr/bin/g++",
 | 
				
			||||||
 | 
					            "cStandard": "gnu17",
 | 
				
			||||||
 | 
					            "cppStandard": "gnu++14"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    "version": 4
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										34
									
								
								.vscode/launch.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								.vscode/launch.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    // Use IntelliSense to learn about possible attributes.
 | 
				
			||||||
 | 
					    // Hover to view descriptions of existing attributes.
 | 
				
			||||||
 | 
					    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
 | 
				
			||||||
 | 
					    "version": "0.2.0",
 | 
				
			||||||
 | 
					    "configurations": [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "(gdb) build and debug project",
 | 
				
			||||||
 | 
					            "type": "cppdbg",
 | 
				
			||||||
 | 
					            "request": "launch",
 | 
				
			||||||
 | 
					            "program": "${workspaceFolder}/build/main",
 | 
				
			||||||
 | 
					            "args": [],
 | 
				
			||||||
 | 
					            "stopAtEntry": false,
 | 
				
			||||||
 | 
					            "cwd": "${workspaceFolder}/build",
 | 
				
			||||||
 | 
					            "environment": [],
 | 
				
			||||||
 | 
					            "externalConsole": false,
 | 
				
			||||||
 | 
					            "MIMode": "gdb",
 | 
				
			||||||
 | 
					            "setupCommands": [
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    "description": "Enable pretty-printing for gdb",
 | 
				
			||||||
 | 
					                    "text": "-enable-pretty-printing",
 | 
				
			||||||
 | 
					                    "ignoreFailures": true
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    "description":  "Set Disassembly Flavor to Intel",
 | 
				
			||||||
 | 
					                    "text": "-gdb-set disassembly-flavor intel",
 | 
				
			||||||
 | 
					                    "ignoreFailures": true
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					            "preLaunchTask": "C/C++: g++ build workspace project"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										19
									
								
								.vscode/tasks.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.vscode/tasks.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "tasks": [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "type": "shell",
 | 
				
			||||||
 | 
					            "label": "C/C++: g++ build workspace project",
 | 
				
			||||||
 | 
					            "command": "${workspaceFolder}/build.sh",
 | 
				
			||||||
 | 
					            "options": {
 | 
				
			||||||
 | 
					                "cwd": "${workspaceFolder}"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "group": {
 | 
				
			||||||
 | 
					                "kind": "build",
 | 
				
			||||||
 | 
					                "isDefault": true
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "problemMatcher": "$gcc",
 | 
				
			||||||
 | 
					            "detail": "compiler: /usr/bin/g++"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    "version": "2.0.0"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										14
									
								
								build.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								build.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,14 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir -p build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ ! -e build/res ]]; then
 | 
				
			||||||
 | 
					    ln -s ../res build/res
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					g++ -g -fdiagnostics-color=always \
 | 
				
			||||||
 | 
					    -Isrc \
 | 
				
			||||||
 | 
					    src/*.cpp \
 | 
				
			||||||
 | 
					    mybox.cpp \
 | 
				
			||||||
 | 
					    -o build/main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										7
									
								
								mybox.code-workspace
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								mybox.code-workspace
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "folders": [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "path": "."
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										11
									
								
								mybox.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								mybox.cpp
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <GLFW/glfw3.h>
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <sub.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main(void) {
 | 
				
			||||||
 | 
					    printf("hello world\n");
 | 
				
			||||||
 | 
					    mysub();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										6
									
								
								src/sub.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/sub.cpp
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void mysub() {
 | 
				
			||||||
 | 
					    printf("hello subroutine\n");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										6
									
								
								src/sub.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/sub.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					#ifndef H__LPR_SUB
 | 
				
			||||||
 | 
					#define H__LPR_SUB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void mysub();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue