# The main things: compiler, linker, flags
CC=gcc
CFLAGS=-Wall -g `pkg-config --cflags gtk+-2.0 gthread-2.0`
LDFLAGS=-g
LIBS=`pkg-config --libs gtk+-2.0 gthread-2.0`

# Sources, object files and target
SRCS=mms_lib.c mms_gui.c
OBJS=mms_lib.o mms_gui.o
TARGET=gmms

# implicit rules
# $< is the input file
# $@ is the output file
.c.o:
	$(CC) $(CFLAGS) -c $< -o $@

# Some phony targets (i.e. targets without files)
.PHONY: all clean realclean install

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

clean:
	rm -f $(OBJS) $(TARGET)

realclean: clean
	rm -f *~
