mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Added new makefile for demo
svn path=/trunk/; revision=5781
This commit is contained in:
parent
121191e9e1
commit
90b7f43de7
1 changed files with 25 additions and 57 deletions
|
@ -1,69 +1,37 @@
|
||||||
# Makefile - Proj_Listing5_1.dsp
|
#
|
||||||
|
# ReactOS explorer
|
||||||
|
#
|
||||||
|
# Makefile
|
||||||
|
#
|
||||||
|
|
||||||
ifndef CFG
|
PATH_TO_TOP = ../../..
|
||||||
CFG=Proj_Listing5_1 - Win32 Debug
|
|
||||||
endif
|
|
||||||
CC=gcc
|
|
||||||
CFLAGS=
|
|
||||||
CXX=g++
|
|
||||||
CXXFLAGS=$(CFLAGS)
|
|
||||||
RC=windres -O COFF
|
|
||||||
ifeq "$(CFG)" "Proj_Listing5_1 - 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_Listing5_1 - 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
|
|
||||||
|
|
||||||
ifndef TARGET
|
TARGET_TYPE = program
|
||||||
TARGET=primitives.exe
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: all
|
TARGET_APPTYPE = windows
|
||||||
all: $(TARGET)
|
|
||||||
|
|
||||||
%.o: %.c
|
TARGET_NAME = primitives
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
%.o: %.cc
|
TARGET_NORC = yes
|
||||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
%.o: %.cpp
|
TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
|
||||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
%.o: %.cxx
|
TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
|
||||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
%.res: %.rc
|
TARGET_SDKLIBS = \
|
||||||
$(RC) $(CPPFLAGS) -o $@ -i $<
|
kernel32.a \
|
||||||
|
user32.a \
|
||||||
|
gdi32.a
|
||||||
|
|
||||||
SOURCE_FILES= \
|
TARGET_OBJECTS = \
|
||||||
mk_font.cpp \
|
primitives.o \
|
||||||
primitives.cpp
|
mk_font.o
|
||||||
|
|
||||||
HEADER_FILES=
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
|
||||||
RESOURCE_FILES=
|
|
||||||
|
|
||||||
SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES)
|
|
||||||
|
|
||||||
OBJS=$(patsubst %.rc,%.res,$(patsubst %.cxx,%.o,$(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(filter %.c %.cc %.cpp %.cxx %.rc,$(SRCS)))))))
|
|
||||||
|
|
||||||
$(TARGET): $(OBJS)
|
|
||||||
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
-del $(OBJS) $(TARGET)
|
|
||||||
|
|
||||||
|
include $(TOOLS_PATH)/helper.mk
|
||||||
|
|
||||||
|
# overide LD_CC to use g++ for linking of the executable
|
||||||
|
LD_CC = $(CXX)
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
Loading…
Reference in a new issue