PROG	= romtool
SRCS	= romtool.c

CFLAGS	= -W -Wall -Werror -pedantic

ifneq ($(WIN32),)
LDFLAGS	= -static-libgcc -static-libstdc++
else
CFLAGS	+= -DHAVE_PROGNAME
endif

OBJS	= $(SRCS:.c=.o)

all:		$(PROG)

clean:
ifeq ($(WIN32),)
	rm -f $(PROG) $(OBJS) core core.*
else
	del $(PROG).exe $(OBJS) /q >NUL 2>&1
endif

$(OBJS):

$(PROG):	$(OBJS)
	$(CC) $(LDFLAGS) -o $(PROG) $<
