diff --git a/.vscode/launch.json b/.vscode/launch.json index 6a353b6..7a2403b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,9 +6,10 @@ "configurations": [ { "name": "colorwrap", + "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/bin/cterm", - "args": ["cterm", "/bin/sh"], + "args": ["/bin/sh"], "cwd": "${workspaceFolder}/" }] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2130696 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "makefile.launchConfigurations": [ + { + "cwd": "/home/icaema/Documents/tools/colorwrap/bin", + "binaryPath": "/home/icaema/Documents/tools/colorwrap/bin/cterm", + "binaryArgs": [] + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index d915286..63b0ad0 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,5 +1,20 @@ { "tasks": [ + { + "type": "cppbuild", + "label": "Make Build", + "command": "make", + "args": [ + "--directory=${workspaceFolder}" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "group": { + "kind": "build", + "isDefault": true + } + }, { "type": "cppbuild", "label": "C/C++: gcc build active file", @@ -19,7 +34,7 @@ ], "group": { "kind": "build", - "isDefault": true + "isDefault": false }, "detail": "Task generated by Debugger." } diff --git a/Makefile b/Makefile index 9114944..72868fe 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ TARGET := bin/cterm SRCEXT := c SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT)) OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o)) -CFLAGS := +CFLAGS := -Wall LIB := -L lib INC := -I include @@ -22,12 +22,7 @@ clean: @echo " Cleaning..."; @echo " $(RM) -r $(BUILDDIR) $(TARGET)"; $(RM) -r $(BUILDDIR) $(TARGET) -# Tests -tester: - $(CC) $(CFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester - -# Spikes -ticket: - $(CC) $(CFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket +test: + $(TARGET) /bin/shxi .PHONY: clean diff --git a/src/main b/src/main index 81b41dc..bd3e472 100755 Binary files a/src/main and b/src/main differ diff --git a/src/main.c b/src/main.c index aa79cab..1e27e83 100644 --- a/src/main.c +++ b/src/main.c @@ -25,10 +25,6 @@ void child_process(char *argv[]){ } - - - - int main(int argc, char *argv[]) { int master; pid_t child_pid;