Files
RomWBW/Tools/unix/bin2asm/Makefile
Wayne Warthen d241db5c11 Makefile Improvements
The clobber target has been removed and the clean target now does what most people would expect (actually cleans the entire build tree).
2022-07-06 16:39:03 -07:00

27 lines
404 B
Makefile

CC = gcc
CFLAGS = -Werror -Wall -Wextra -Wconversion -O2 -D NDEBUG
BINARY = bin2asm
DEST := ../../$(shell uname)
SRC_FILES = $(wildcard *.c)
OBJ_FILES = $(SRC_FILES:.c=.o)
all: $(BINARY) $(DEST)
cp -p $(BINARY) $(DEST)
$(DEST):
mkdir -p $(DEST)
.PHONY: clean
clean:
rm -f $(OBJ_FILES) $(BINARY)
$(BINARY): $(OBJ_FILES)
$(CC) -o $@ $^ $(LIBS)
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS) $(IMPORT)