# Makefile for explosions

# by Bill Kendrick
# bill@newbreedsoftware.com
# http://www.newbreedsoftware.com/bill/

# July 30, 2001 - July 31, 2001


# CFLAGS to send to compiler:
# -Wall = Show all warnings
# -O2 = Optimize
# $(SDL_FLAGS) = Attaches compiler flags needed for libSDL

CFLAGS=-Wall -O2 $(SDL_CFLAGS)


# Call "sdl-config" program to get compiler flags needed for libSDL

SDL_CFLAGS := $(shell sdl-config --cflags)


# Call "sdl-config" program to get linker flags needed to link with libSDL

SDL_LDFLAGS := $(shell sdl-config --libs)


# All flags needed to link with libSDL and related libraries:
# $(SDL_LDFLAGS) = Attaches linker flags needed for libSDL
# -lSDL_image = Attaches linker flag needed for SDL_image (used for PNG support)

SDL_LIB=$(SDL_LDFLAGS) -lSDL_image



# Makefile 'commands':

# Build and strip the executable:

all:	explosions
	strip explosions


# Remove the executable and ".o" object files:

clean:
	-rm *.o
	-rm explosions


# The executable:

explosions:	explosions.o
	$(CC) $(CFLAGS)	explosions.o -o explosions $(SDL_LIB) -lm



# The executable's ".o" object file:

explosions.o:	explosions.c
