-
Notifications
You must be signed in to change notification settings - Fork 102
/
Makefile.include.in
49 lines (38 loc) · 1.25 KB
/
Makefile.include.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
AR=ar
ARFLAGS=rus
RM=rm -f
prefix=@prefix@
CXX=@CXX@
CC=@CC@
CFLAGS+=@DEBUG_FLAGS@
CFLAGS+=@LZO_INCLUDES@
INCLUDES+=@INCLUDES@
DEFINES+=-D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 @SDL_DEFINES@ -DINSTALL_PATH="\"@prefix@/share/xbmc\""
.cpp.o:
rm -f ${<:.cpp=.o}
$(CXX) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.cpp=.o}
.c.o:
rm -f ${<:.c=.o}
$(CC) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.c=.o}
.S.o:
rm -f ${<:.S=.o}
$(CC) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.S=.o}
%.h.gch : %.h
$(CXX) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@
OBJS+=$(patsubst %.cpp,%.o,$(patsubst %.S,%.o,$(SRCS)))
.PHONY : lib pch clean depend
lib: $(OBJS)
pch: $(PCH:.h=.h.gch)
for d in $(DIRS); do (cd $$d; $(MAKE) pch ); done
clean:
$(RM) $(OBJS) $(LIB) $(PCH:.h=.h.gch)
for d in $(DIRS); do (cd $$d; $(MAKE) clean ); done
distclean: clean
@echo "Removing all object file (.o)"
@find . -name "*.o" -exec echo 'Removing "{}"' \; -exec rm "{}" \;
@echo "Removing all object file (.depend)"
@find . -name "*.depend" -exec echo 'Removing "{}"' \; -exec rm "{}" \;
@echo "Done."
depend: $(PCH) $(SRCS)
-$(CXX) -MM $(DEFINES) $(INCLUDES) $(SRCS) > Makefile.depend
-for d in $(DIRS); do (cd $$d; $(MAKE) depend ); done