Untitled

 avatar
unknown
plain_text
4 months ago
596 B
2
Indexable
# Compiler and flags
CC = gcc
CFLAGS = -Wall -Wextra -std=c11

# Windows-specific delete command
DEL = del

# Output file and source files
OUTPUT = program.exe
SOURCES = main.c speicherverwaltung.c

# Default target
all: build

# Compile and link the program
build: $(SOURCES)
	$(CC) $(CFLAGS) -o $(OUTPUT) $(SOURCES)
	@echo Compilation successful!

# Run the program (Windows syntax)
run: $(OUTPUT)
	$(OUTPUT)

# Clean up generated files
clean:
	@echo Cleaning up...
	$(DEL) $(OUTPUT)

# Phony targets to avoid conflicts with file names
.PHONY: all build run clean
Editor is loading...
Leave a Comment