|
1 | 1 | # See https://stackoverflow.com/questions/714100/os-detecting-makefile |
2 | 2 |
|
3 | 3 | SRC = mp.pas \ |
4 | | - Common.pas \ |
5 | | - Diagnostic.pas \ |
6 | | - FileIO.pas \ |
7 | | - MathEvaluate.pas \ |
8 | | - Messages.pas \ |
9 | | - Numbers.pas \ |
10 | | - Optimize.pas \ |
11 | | - Parser.pas \ |
12 | | - Scanner.pas \ |
13 | | - StringUtilities.pas \ |
14 | | - TestUnits.pas \ |
15 | | - Utilities.pas \ |
16 | | - include/*.inc \ |
17 | | - include/opt6502/*.inc \ |
18 | | - include/opt65c02/*.inc \ |
19 | | - targets/*.inc |
| 4 | + Common.pas \ |
| 5 | + Diagnostic.pas \ |
| 6 | + FileIO.pas \ |
| 7 | + MathEvaluate.pas \ |
| 8 | + Messages.pas \ |
| 9 | + Numbers.pas \ |
| 10 | + Optimize.pas \ |
| 11 | + Parser.pas \ |
| 12 | + Scanner.pas \ |
| 13 | + StringUtilities.pas \ |
| 14 | + TestUnits.pas \ |
| 15 | + Utilities.pas \ |
| 16 | + include/*.inc \ |
| 17 | + include/opt6502/*.inc \ |
| 18 | + include/opt65c02/*.inc \ |
| 19 | + targets/*.inc |
20 | 20 |
|
21 | 21 | BINBASEDIR = ../bin |
22 | 22 | ifeq ($(OS),Windows_NT) |
23 | | - BINDIR = $(BINBASEDIR)/windows_x86_64 |
24 | | - BIN = $(BINDIR)/mp.exe |
| 23 | + BINDIR = $(BINBASEDIR)/windows_x86_64 |
| 24 | + BIN = $(BINDIR)/mp.exe |
25 | 25 | else |
26 | | - UNAME_S := $(shell uname -s) |
27 | | - UNAME_P := $(shell uname -p) |
28 | | - ifeq ($(UNAME_S),Linux) |
29 | | - # TODO |
| 26 | + UNAME_S := $(shell uname -s) |
| 27 | + UNAME_P := $(shell uname -p) |
| 28 | + ifeq ($(UNAME_S),Linux) |
| 29 | + # TODO |
30 | 30 | # BINDIR = $(BINBASEDIR)/linux_$(UNAME_P) |
31 | 31 | BIN = $(BINDIR)/mp |
32 | | - endif |
33 | | - ifeq ($(UNAME_S),Darwin) |
34 | | - ifneq ($(filter arm%,$(UNAME_P)),) |
35 | | - BINDIR = $(BINBASEDIR)/macosx_aarch64 |
36 | | - endif |
37 | | - ifeq ($(UNAME_P),x86_64) |
38 | | - BINDIR = $(BINBASEDIR)/macosx_x86_64 |
39 | | - endif |
40 | | - BIN = $(BINDIR)/mp |
41 | | - endif |
| 32 | + endif |
| 33 | + ifeq ($(UNAME_S),Darwin)A |
| 34 | + ifneq ($(filter arm%,$(UNAME_P)),) |
| 35 | + BINDIR = $(BINBASEDIR)/macosx_aarch64 |
| 36 | + endif |
| 37 | + ifeq ($(UNAME_P),x86_64) |
| 38 | + BINDIR = $(BINBASEDIR)/macosx_x86_64 |
| 39 | + endif |
| 40 | + BIN = $(BINDIR)/mp |
| 41 | + endif |
42 | 42 | endif |
43 | 43 |
|
44 | 44 | $(BIN): $(SRC) |
|
50 | 50 | rm -fv *.o *.ppu $(BIN) $(BINDIR)/*.o $(BINDIR)/*.ppu |
51 | 51 |
|
52 | 52 | .PHONY: clean |
| 53 | + |
0 commit comments