diff --git a/Makefile b/Makefile index e09ef551a83b594b76bcb7f3d2fd05112513f7d9..3571f335b904edf57e4dcf63c49dfe52b4c5e2e6 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ # For implementation CC=gcc -std=c99 CFLAGS=-I./src -I./include -LIB= -OBJ=./src/utils.o ./src/commands.o ./src/built_in.o +LIB=-lpthread +OBJ=./src/utils.o ./src/commands.o ./src/built_in.o ./src/signal.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) mysh: $(OBJ) - $(CC) -o $@ $^ ./src/main.c $(CFLAGS) + $(CC) -o $@ $^ ./src/main.c $(CFLAGS) $(LIB) # For testing CXX=g++ -std=c++11 @@ -18,7 +18,7 @@ TESTING_SRC=./tests/src/command_parsing_test.cc ./tests/src/command_validate_tes TESTING_EXE=mysh-test test: $(OBJ) - $(CXX) $(TESTING_FLAGS) -o $(TESTING_EXE) $(TESTING_SRC) $(OBJ) $(TESTING_LIB) + $(CXX) $(TESTING_FLAGS) -o $(TESTING_EXE) $(TESTING_SRC) $(OBJ) $(TESTING_LIB) $(LIB) ./$(TESTING_EXE) clean: diff --git a/include/signal.h b/include/signal.h index e255fdab7397db93c9228beb1f9d660a91b51801..5bcabbe9411f63536ff1c63f9f3b2bb38b2d485d 100644 --- a/include/signal.h +++ b/include/signal.h @@ -1,8 +1,8 @@ #ifndef SIGNAL_H_ #define SIGNAL_H_ -void catch_sigint(int); +void catch_sigint(int signalNo); -void catch_sigtstp(int); +void catch_sigtstp(int signalNo); #endif // SIGNAL_H_ diff --git a/src/signal.c b/src/signal.c index 10b45cae6f0ff705a0dd100d438de4534c8786db..e6a785bfc4256b9a3350cdbbaa54c793c0b5a9b9 100644 --- a/src/signal.c +++ b/src/signal.c @@ -1,11 +1,11 @@ #include "signal.h" -void catch_sigint(int) +void catch_sigint(int signalNo) { // TODO: File this! } -void catch_sigtstp(int); +void catch_sigtstp(int signalNo) { // TODO: File this! }