Skip to content

Commit

Permalink
fix makefile, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
reednel committed Dec 13, 2022
1 parent 5e61b5e commit cf7313c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ OBJECT_FILES = $(addprefix obj/,$(SOURCE:.cpp=.o))
ifdef SystemRoot # Wndows
RM = del /Q
RMOBJ = obj\*.o
MKDIR =
else # Unix
RM = rm -f
RMOBJ = obj/*.o
MKDIR = @mkdir -p $(@D)
endif

all: $(OBJECT_FILES)
$(CC) -g $(OBJECT_FILES) -o $(TARGET)

obj/%.o: src/%.cpp $(HEADER_FILES)
$(MKDIR)
$(CC) $(FLAGS) -o $@ $<

clean:
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@ This program requires C++20 or higher.

## Compilation

Unix: `make`
### Unix

Windows: `work in progress`
`make`

### Windows

```cmd
mkdir obj
make
```

In addition to C++20, Windows requires a special means to run the provided makefile. The MinGW Package Manager provides a lightweight make function. It is recommended to follow [this guide](https://linuxhint.com/run-makefile-windows/), however any method for compiling C++ should suffice.

## Usage

Expand Down

0 comments on commit cf7313c

Please sign in to comment.