Seperate Screen Files #1

Merged
amberisvibin merged 7 commits from seperate_screen_files into main 2025-08-05 17:39:36 -04:00
Showing only changes of commit db26be2a07 - Show all commits

View File

@@ -1,17 +1,37 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
CC=gcc # Makefile for Amber's BBS Interface
CFLAGS=-std=c99 -pedantic -Wall -Wextra -O2 -ggdb # Buildsys by Gale Faraday
LIBS=-lncursesw
EXECUTABLE=bbs
# .PHONY: all .PHONY: all clean run
# all: make .SUFFIXES:
make: bbs .DEFAULT_GOAL := all
bbs: bbs.c home.c home.h globals.h TARGET := $(shell basename $(CURDIR))
$(CC) $(CFLAGS) $(LIBS) bbs.c home.c -o $(EXECUTABLE) SOURCES := src/
BUILD := build/
OBJS := $(patsubst $(SOURCES)%.c,$(BUILD)%.o,$(wildcard $(SOURCES)*.c))
EXECUTABLE := $(TARGET)
run: bbs
CC := gcc
LD := gcc
CFLAGS := -std=c99 -pedantic -Wall -Wextra -O2 -ggdb
LDFLAGS := $(CFLAGS) -lncursesw
all: $(EXECUTABLE)
run: $(EXECUTABLE)
./$(EXECUTABLE) ./$(EXECUTABLE)
.IGNORE: clean
clean:
@rm -rvf $(BUILD) $(EXECUTABLE)
$(EXECUTABLE): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^
$(OBJS): $(BUILD)%.o : $(SOURCES)%.c
-@mkdir -p $(BUILD)
$(CC) $(CFLAGS) -o $@ -c $<