Uploaded Initial Repo Files

This commit is contained in:
Anachronaut
2024-10-16 23:12:59 -04:00
committed by GitHub
parent f611177a66
commit 2fd311f107
15 changed files with 815 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
# SplitBit Emulator Makefile
# Anachronaut
# 10/16/2024
# Compiler and flags
CC = gcc
CFLAGS = -Wall
# Directories
SRC_DIR = Source
OBJ_DIR = Object
# Source files
SRCS = emulator.c io.c utility.c cpu.c bootstrap.c
OBJS = $(SRCS:%.c=$(OBJ_DIR)/%.o)
# Output binary name
TARGET = SplitBit
# Default target
all: $(TARGET)
# Create binary by linking object files
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $(TARGET) $(OBJS)
# Compile source files to object files
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
mkdir -p $(OBJ_DIR)
$(CC) $(CFLAGS) -c $< -o $@
# Clean up object and binary files
clean:
rm -rf $(OBJ_DIR) $(BIN_DIR)
# Phony targets
.PHONY: all clean