Skip to content

Instantly share code, notes, and snippets.

@surinoel
Created August 13, 2019 00:55
Show Gist options
  • Select an option

  • Save surinoel/b3d7996488a3e860f93f5bf42ee822e8 to your computer and use it in GitHub Desktop.

Select an option

Save surinoel/b3d7996488a3e860f93f5bf42ee822e8 to your computer and use it in GitHub Desktop.
.PHONY: all clean
CFLAGS = -Wall -Werror -pthread
TARGET = exeFile
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
all : $(TARGET)
$(TARGET) : $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ -lrt -lstdc++
clean:
rm -f *.o $(TARGET)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment