0
|
1 |
CC = gcc
|
|
2 |
CFLAGS = -Wall -O2 -DLINUX -DWINAPI="" $(shell sdl-config --cflags)
|
|
3 |
INCLUDE= -I../include
|
|
4 |
LDFLAGS = -Wl,-rpath,lib $(shell sdl-config --libs)
|
|
5 |
DEBUG = -g -ggdb
|
|
6 |
TARGET = ../bin/audioplayer
|
|
7 |
OBJECTS = \
|
|
8 |
main.o \
|
|
9 |
audioplayer.o
|
|
10 |
|
|
11 |
.c.o:
|
|
12 |
@$(CC) -c $(CFLAGS) $(INCLUDE) $(DEBUG) -o $@ $<
|
|
13 |
@echo "CC $<"
|
|
14 |
|
|
15 |
all: $(TARGET)
|
|
16 |
|
|
17 |
$(TARGET): $(OBJECTS)
|
|
18 |
@$(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
|
19 |
@echo "LD OBJECTS -o $@"
|
|
20 |
|
|
21 |
.PHONY: clean distclean
|
|
22 |
|
|
23 |
clean:
|
|
24 |
@rm -f *.o *~
|
|
25 |
@echo "CLEANING $$PWD"
|
|
26 |
|
|
27 |
distclean:
|
|
28 |
@make clean
|
|
29 |
@rm -f $(TARGET)
|
|
30 |
@echo "WIPING $$PWD OUT"
|
|
31 |
|
|
32 |
install: $(TARGET)
|
|
33 |
install -m 755 $(TARGET) ~/bin/
|
|
34 |
|