From bf3eb0bdde1b32eeb24b51a716b671f9ba4e8f5d Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Sat, 23 Aug 2003 06:48:35 +0000 Subject: [PATCH] Fixed another demo svn path=/trunk/; revision=5785 --- reactos/apps/tests/wm_erasebkgnd/makefile | 73 +++++-------------- ...mo_WM_ERASEBKGND.cpp => wm_erasebkgnd.cpp} | 0 2 files changed, 19 insertions(+), 54 deletions(-) rename reactos/apps/tests/wm_erasebkgnd/{Demo_WM_ERASEBKGND.cpp => wm_erasebkgnd.cpp} (100%) diff --git a/reactos/apps/tests/wm_erasebkgnd/makefile b/reactos/apps/tests/wm_erasebkgnd/makefile index 5c6818c00c1..50c09860ec5 100644 --- a/reactos/apps/tests/wm_erasebkgnd/makefile +++ b/reactos/apps/tests/wm_erasebkgnd/makefile @@ -1,66 +1,31 @@ -# Makefile - Proj_Demo_WM_ERASEBKGND.dsp -ifndef CFG -CFG=Proj_Demo_WM_ERASEBKGND - Win32 Debug -endif -CC=gcc -CFLAGS= -CXX=g++ -CXXFLAGS=$(CFLAGS) -RC=windres -O COFF -ifeq "$(CFG)" "Proj_Demo_WM_ERASEBKGND - Win32 Release" -CFLAGS+=-fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -W -LD=$(CXX) $(CXXFLAGS) -LDFLAGS= -LDFLAGS+=-Wl,--subsystem,windows -LIBS+=-lkernel32 -luser32 -lgdi32 -else -ifeq "$(CFG)" "Proj_Demo_WM_ERASEBKGND - Win32 Debug" -CFLAGS+=-fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -LD=$(CXX) $(CXXFLAGS) -LDFLAGS= -LDFLAGS+=-Wl,--subsystem,windows -LIBS+=-lkernel32 -luser32 -lgdi32 -endif -endif +PATH_TO_TOP = ../../.. -ifndef TARGET -TARGET=WM_ERASEBKGND.exe -endif +TARGET_TYPE = program -.PHONY: all -all: $(TARGET) +TARGET_APPTYPE = windows -%.o: %.c - $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< +TARGET_NAME = wm_erasebkgnd -%.o: %.cpp - $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $< +TARGET_NORC = yes -%.res: %.rc - $(RC) $(CPPFLAGS) -o $@ -i $< +TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API + +TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -SOURCE_FILES= \ - Demo_WM_ERASEBKGND.cpp +TARGET_SDKLIBS = \ + kernel32.a \ + user32.a \ + gdi32.a -HEADER_FILES= +TARGET_OBJECTS = \ + wm_erasebkgnd.o -RESOURCE_FILES= +include $(PATH_TO_TOP)/rules.mak -SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES) +include $(TOOLS_PATH)/helper.mk -OBJS=$(patsubst %.rc,%.res,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(filter %.c %.cpp %.rc,$(SRCS))))) - -$(TARGET): $(OBJS) - $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) - -.PHONY: clean -clean: - del $(OBJS) $(TARGET) Proj_Demo_WM_ERASEBKGND.dep - -.PHONY: depends -depends: - -$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cpp,$(SRCS)) > Proj_Demo_WM_ERASEBKGND.dep - --include Proj_Demo_WM_ERASEBKGND.dep +# overide LD_CC to use g++ for linking of the executable +LD_CC = $(CXX) +# EOF diff --git a/reactos/apps/tests/wm_erasebkgnd/Demo_WM_ERASEBKGND.cpp b/reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp similarity index 100% rename from reactos/apps/tests/wm_erasebkgnd/Demo_WM_ERASEBKGND.cpp rename to reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp