aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2022-10-15 13:25:34 +0200
committerBad Diode <bd@badd10de.dev>2022-10-15 13:25:34 +0200
commit8864a4d8ef6a8597f351f05cfc24b596f24d19e9 (patch)
tree3bf31d60bade570035e25300b7dc379b28dc7fd0
parent7086953c37c98df53b7f13351e9ab07fc3cca6a1 (diff)
downloaduxn64-8864a4d8ef6a8597f351f05cfc24b596f24d19e9.tar.gz
uxn64-8864a4d8ef6a8597f351f05cfc24b596f24d19e9.zip
Add gitignore
-rw-r--r--.gitignore1
-rw-r--r--Makefile11
2 files changed, 7 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..378eac2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
build
diff --git a/Makefile b/Makefile
index 62f0c8d..436fe0a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
1.POSIX: 1.POSIX:
2.SUFFIXES: 2.SUFFIXES:
3.PHONY: main run clean
3 4
4# Paths for SDK. 5# Paths for SDK.
5SDK_BASE := /opt/n64sdk 6SDK_BASE := /opt/n64sdk
@@ -62,10 +63,9 @@ else
62 CFLAGS += $(RELEASE_CFLAGS) 63 CFLAGS += $(RELEASE_CFLAGS)
63endif 64endif
64 65
65main: $(BIN) 66main: $(BUILD_DIR) $(BIN)
66 67
67$(ELF): $(SRC_MAIN) $(WATCH_SRC) 68$(ELF): $(SRC_MAIN) $(WATCH_SRC)
68 mkdir -p $(BUILD_DIR)
69 $(CC) $(CFLAGS) $(LDFLAGS) -o $(ELF) $(SRC_MAIN) $(LDLIBS) 69 $(CC) $(CFLAGS) $(LDFLAGS) -o $(ELF) $(SRC_MAIN) $(LDLIBS)
70 70
71$(BIN): $(ELF) $(OBJECTS) $(WATCH_SRC) 71$(BIN): $(ELF) $(OBJECTS) $(WATCH_SRC)
@@ -85,9 +85,10 @@ run: $(BIN)
85clean: 85clean:
86 rm -rf $(BUILD_DIR) 86 rm -rf $(BUILD_DIR)
87 87
88.PHONY: main run clean 88# Create the build directory.
89$(BUILD_DIR):
90 mkdir -p $(BUILD_DIR)
89 91
90# Inference rules. 92# Inference rules for C files.
91$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c 93$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
92 mkdir -p $(BUILD_DIR)
93 $(CC) $(CFLAGS) $< -o $@ 94 $(CC) $(CFLAGS) $< -o $@