fixed up toolchain and build options

This commit is contained in:
Stephen Toth 2023-09-23 10:57:51 -04:00
parent 354e9f0027
commit d0a049d994
6 changed files with 30 additions and 14 deletions

3
.vscode/launch.json vendored
View File

@ -6,9 +6,10 @@
"configurations": [ "configurations": [
{ {
"name": "colorwrap", "name": "colorwrap",
"type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/bin/cterm", "program": "${workspaceFolder}/bin/cterm",
"args": ["cterm", "/bin/sh"], "args": ["/bin/sh"],
"cwd": "${workspaceFolder}/" "cwd": "${workspaceFolder}/"
}] }]
} }

9
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,9 @@
{
"makefile.launchConfigurations": [
{
"cwd": "/home/icaema/Documents/tools/colorwrap/bin",
"binaryPath": "/home/icaema/Documents/tools/colorwrap/bin/cterm",
"binaryArgs": []
}
]
}

17
.vscode/tasks.json vendored
View File

@ -1,5 +1,20 @@
{ {
"tasks": [ "tasks": [
{
"type": "cppbuild",
"label": "Make Build",
"command": "make",
"args": [
"--directory=${workspaceFolder}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{ {
"type": "cppbuild", "type": "cppbuild",
"label": "C/C++: gcc build active file", "label": "C/C++: gcc build active file",
@ -19,7 +34,7 @@
], ],
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": false
}, },
"detail": "Task generated by Debugger." "detail": "Task generated by Debugger."
} }

View File

@ -5,7 +5,7 @@ TARGET := bin/cterm
SRCEXT := c SRCEXT := c
SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT)) SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o)) OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
CFLAGS := CFLAGS := -Wall
LIB := -L lib LIB := -L lib
INC := -I include INC := -I include
@ -22,12 +22,7 @@ clean:
@echo " Cleaning..."; @echo " Cleaning...";
@echo " $(RM) -r $(BUILDDIR) $(TARGET)"; $(RM) -r $(BUILDDIR) $(TARGET) @echo " $(RM) -r $(BUILDDIR) $(TARGET)"; $(RM) -r $(BUILDDIR) $(TARGET)
# Tests test:
tester: $(TARGET) /bin/shxi
$(CC) $(CFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester
# Spikes
ticket:
$(CC) $(CFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket
.PHONY: clean .PHONY: clean

BIN
src/main

Binary file not shown.

View File

@ -25,10 +25,6 @@ void child_process(char *argv[]){
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
int master; int master;
pid_t child_pid; pid_t child_pid;