# --- MorphOS SDK Makefile for Magic2Morph --- # Compiler and Linker definitions CC = gcc STRIP = strip # Compilation Flags # -O2: High-level code optimization # -Wall: Enable all compiler warning alerts # -noixemul: Link cleanly against native MorphOS library bindings CFLAGS = -O2 -Wall -noixemul # Target binary name and sources # Changed TARGET to place the binary inside the c/ directory TARGET = c/Magic2Morph SRC = Magic2Morph.c OBJ = $(SRC:.c=.o) # Default Rule: Compiles and strips the binary all: $(TARGET) $(TARGET): $(OBJ) @mkdir -p c $(CC) $(CFLAGS) $(OBJ) -o $(TARGET) $(STRIP) $(TARGET) @echo "Build successful: $(TARGET) has been created." # Rule to compile individual source files into object modules %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ # Clean Rule: Removes intermediate build files and executables clean: @rm -f $(OBJ) $(TARGET) @echo "Directory cleaned up." .PHONY: all clean