player/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sun, 14 Dec 2008 12:50:33 +0100
changeset 2 6ee2a130dc07
parent 0 06dd3b8d90ad
permissions -rw-r--r--
Common Makefile Style committer: Markus Bröker <mbroeker@largo.homelinux.org>

    CC	= gcc
CFLAGS =  -Wall -O2 -DLINUX -DWINAPI="" $(shell sdl-config --cflags)
INCLUDE= -I../include
LDFLAGS = -Wl,-rpath,lib $(shell sdl-config --libs)
 DEBUG	= -g -ggdb
TARGET  = ../bin/audioplayer
OBJECTS = \
	main.o \
	audioplayer.o

.c.o:
	@$(CC) -c $(CFLAGS) $(INCLUDE) $(DEBUG) -o $@ $<
	@echo "CC $<"

all: $(TARGET)

$(TARGET): $(OBJECTS)
	@$(CC) $(OBJECTS) $(LDFLAGS) -o $@
	@echo "LD OBJECTS -o $@"

.PHONY: clean distclean

clean:
	@rm -f *.o *~
	@echo "CLEANING $$PWD"

distclean:
	@make clean
	@rm -f $(TARGET)
	@echo "WIPING $$PWD OUT"

install: $(TARGET)
	install -m 755 $(TARGET) ~/bin/