Support for resource files on win32 - other platforms currently

ignore the RESFILE and RCFILE variables
This commit is contained in:
spider 1998-05-23 18:34:48 +00:00
Родитель 24e2a1dcba
Коммит 2435513afc
4 изменённых файлов: 30 добавлений и 3 удалений

Просмотреть файл

@ -48,6 +48,11 @@ DLL_SUFFIX = dll
OUT_NAME = -out:
ARCHIVE_SUFFIX = _s
ifdef RCFILE
RCFILE := $(RCFILE).rc
RESFILE = $(OBJDIR)/$(RCFILE:.rc=.res)
endif
OS_LIBS = gdi32.lib kernel32.lib advapi32.lib user32.lib
GUI_LIBS =
@ -76,7 +81,7 @@ else
#OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od
DEFINES += -DDEBUG -D_DEBUG -UNDEBUG
DLLFLAGS += -DEBUG -DEBUGTYPE:CV -OUT:"$@"
LDFLAGS += -DEBUG -DEBUGTYPE:BOTH /SUBSYSTEM:CONSOLE /NOLOGO
LDFLAGS += -DEBUG -DEBUGTYPE:BOTH /SUBSYSTEM:WINDOWS /NOLOGO
endif
# XXX FIXME: I doubt we use this. It is redundant with

Просмотреть файл

@ -207,7 +207,11 @@ alltags:
find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
$(PROGRAM): $(OBJS)
$(RESFILE):
echo Creating Resource file: $(RESFILE)
$(RC) $(RCFLAGS) -r -Fo$(RESFILE) $(RCFILE)
$(PROGRAM): $(OBJS) $(RESFILE)
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH),WINNT)
ifeq ($(OS_TARGET),WIN16)
@ -225,7 +229,7 @@ ifeq ($(OS_TARGET),WIN16)
$(LINK) @w16link.
rm w16link
else
$(LINK_EXE) $(MAP) $(PDB) $(IMP) $(OBJS) $(OUT_NAME)$(PROGRAM) $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
$(LINK_EXE) $(MAP) $(PDB) $(IMP) $(OBJS) $(OUT_NAME)$(PROGRAM) $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(RESFILE)
endif
else
$(LINK_PROGRAM) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS)

Просмотреть файл

@ -139,6 +139,10 @@ ifdef PROGRAM
PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(PROG_SUFFIX))
endif
#ifdef RCFILE
# RCFILE := $(addprefix $(OBJDIR)/, $(RCFILE)$(RC_SUFFIX))
# endif
ifndef LIBRARY
ifdef LIBRARY_NAME
LIBRARY = lib$(LIBRARY_NAME).$(LIB_SUFFIX)

Просмотреть файл

@ -29,6 +29,20 @@ ifndef OBJ_SUFFIX
endif
endif
#
# Resource suffixes
#
ifndef RC_SUFFIX
ifeq ($(OS_ARCH), WINNT)
RC_SUFFIX = .rc
RES_SUFFIX = .res
else
RC_SUFFIX =
RES_SUFFIX =
endif
endif
#
# Library suffixes
#