Casio_asm/assembler/Makefile

35 lines
511 B
Makefile

CC ?= gcc
CFLAGS ?=
LDFLAGS ?=
LDLIBS ?= -lSDL2
SUFFIXES ?= .c .o
.SUFFIXES: $(SUFFIXES) .
PROG = casio_asm_assembler
OBJS = main.o assembler.o assemblerConfig.o
LINK = ../common/*.o
all: $(PROG)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(LINK) $(LDLIBS)
.c.o:
$(CC) $(CFLAGS) -c $*.c
clean:
rm -f *.o
rm -f $(PROG)
rm -f $(PROG).exe
cleanrun: clean run
run: all
./$(PROG) ../test/test.asm ../test/test.bin
test: clean deps run
deps:
(cd ../common && make clean && make)