Skip to content

Commit cf7313c

Browse files
author
reednel
committed
fix makefile, update readme
1 parent 5e61b5e commit cf7313c

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ OBJECT_FILES = $(addprefix obj/,$(SOURCE:.cpp=.o))
1111
ifdef SystemRoot # Wndows
1212
RM = del /Q
1313
RMOBJ = obj\*.o
14+
MKDIR =
1415
else # Unix
1516
RM = rm -f
1617
RMOBJ = obj/*.o
18+
MKDIR = @mkdir -p $(@D)
1719
endif
1820

1921
all: $(OBJECT_FILES)
2022
$(CC) -g $(OBJECT_FILES) -o $(TARGET)
2123

2224
obj/%.o: src/%.cpp $(HEADER_FILES)
25+
$(MKDIR)
2326
$(CC) $(FLAGS) -o $@ $<
2427

2528
clean:

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@ This program requires C++20 or higher.
1212

1313
## Compilation
1414

15-
Unix: `make`
15+
### Unix
1616

17-
Windows: `work in progress`
17+
`make`
18+
19+
### Windows
20+
21+
```cmd
22+
mkdir obj
23+
make
24+
```
25+
26+
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.
1827

1928
## Usage
2029

0 commit comments

Comments
 (0)