
SDLLIB = $(shell sdl-config --libs)
SDLFLAGS = $(shell sdl-config --cflags)

SRCS = disasm.c audio.c configuration.c dialog.c \
  file.c hostcall.c keymap.c \
  main.c memAlloc.c misc.c \
  screen.c screenConvert.c \
  sdlgui.c shortcut.c scalebit.c \
  input.c fe2.c 

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

.c.o:
	$(CC) $(CFLAGS) $(INCFLAGS) $(SDLFLAGS) -c $<

../frontier: $(OBJS)
	$(CC) $(OBJS) $(FE2OBJS) $(SDLLIB) $(LIBFLAGS) -o ../frontier

clean:
	rm -f *.o

# Use "make depend" to generate file dependencies:
depend: $(SRCS)
	$(CC) -MM $(CFLAGS) $(SRCS) > Makefile.dep

ifneq (,$(wildcard Makefile.dep))
include Makefile.dep
endif

