Rev Author Line No. Line
3298 kaklik 1 ifneq ($(V),1)
2 Q := @
3 endif
4  
5 INCDIR = -I /usr/include/SDL
6 CCFLAGS = -g -O2 -Wall -W $(INCDIR)
7 CXXFLAGS = $(CCFLAGS)
8 LDFLAGS = -l asound -l SDL
9 CC = gcc $(CCFLAGS)
10 CXX = g++ $(CXXFLAGS)
11 LD = g++ $(LDFLAGS)
12  
13 BINS = sonar
14 OBJS = sonar.o
15  
16 all: $(BINS)
17  
18 clean:
19 $(Q) rm -f *.o $(BINS) $(OBJS)
20 @printf " CLEAN\n";
21  
22 .c.o:
23 @printf " CC $(subst $(shell pwd)/,,$(@))\n";
24 $(Q) $(CC) -c -o$@ $<
25  
26 .cpp.o:
27 @printf " CXX $(subst $(shell pwd)/,,$(@))\n";
28 $(Q) $(CXX) -c -o$@ $<
29  
30 sonar: $(OBJS)
31 @printf " LD $(subst $(shell pwd)/,,$(@))\n";
32 $(Q) $(LD) -o$@ $(OBJS)