:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / apps / tests / patblt / makefile
1 # Makefile - Proj_Listing2_1.dsp
2
3 ifndef CFG
4 CFG=Proj_Listing2_1 - Win32 Debug
5 endif
6 CC=gcc
7 CFLAGS=
8 CXX=g++
9 CXXFLAGS=$(CFLAGS)
10 RC=windres -O COFF
11 ifeq "$(CFG)"  "Proj_Listing2_1 - Win32 Release"
12 CFLAGS+=-fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -W
13 LD=$(CXX) $(CXXFLAGS)
14 LDFLAGS=
15 LDFLAGS+=-Wl,--subsystem,windows
16 LIBS+=-lkernel32 -luser32 -lgdi32
17 else
18 ifeq "$(CFG)"  "Proj_Listing2_1 - Win32 Debug"
19 CFLAGS+=-fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W
20 LD=$(CXX) $(CXXFLAGS)
21 LDFLAGS=
22 LDFLAGS+=-Wl,--subsystem,windows
23 LIBS+=-lkernel32 -luser32 -lgdi32
24 endif
25 endif
26
27 ifndef TARGET
28 TARGET=patblt.exe
29 endif
30
31 .PHONY: all
32 all: $(TARGET)
33
34 %.o: %.c
35         $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
36
37 %.o: %.cpp
38         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
39
40 %.res: %.rc
41         $(RC) $(CPPFLAGS) -o $@ -i $<
42
43 SOURCE_FILES= \
44         patblt.cpp
45
46 HEADER_FILES=
47
48 RESOURCE_FILES=
49
50 SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES) 
51
52 OBJS=$(patsubst %.rc,%.res,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(filter %.c %.cpp %.rc,$(SRCS)))))
53
54 $(TARGET): $(OBJS)
55         $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
56
57 .PHONY: clean
58 clean:
59         -del $(OBJS) $(TARGET)
60
61 .PHONY: depends
62 depends:
63         -$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cpp,$(SRCS)) > Proj_Listing2_1.dep
64
65 -include Proj_Listing2_1.dep
66