Update of /cvsroot/cbar/cbar/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17658/misc
Modified Files:
makefile.all makefile.bcc makefile.dj makefile.mgw
makefile.uni makefile.vc makefile.ver zipup.sh
Log Message:
Some more makefile cleanup/improvements
Index: makefile.all
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/makefile.all,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** makefile.all 4 Feb 2004 06:21:59 -0000 1.3
--- makefile.all 8 Feb 2004 11:34:11 -0000 1.4
***************
*** 157,167 ****
endif
! $(OBJ_DIR)/%$(OBJ_SUFFIX): %.c $(COMPILE_C_TO_OBJ_DEPS)
$(COMPILE_C_TO_OBJ)
! $(LIB_NAME): $(LIB_OBJS) $(LINK_OBJ_TO_LIB_DEPS)
$(LINK_OBJ_TO_LIB)
! examples/%$(EXE_SUFFIX): $(OBJ_DIR)/%$(OBJ_SUFFIX) $(LIB_NAME) $(LINK_OBJ_TO_EXE_DEPS)
$(LINK_OBJ_TO_EXE)
--- 157,167 ----
endif
! $(OBJ_DIR)/%$(OBJ_SUFFIX): %.c
$(COMPILE_C_TO_OBJ)
! $(LIB_NAME): $(LIB_OBJS)
$(LINK_OBJ_TO_LIB)
! examples/%$(EXE_SUFFIX): $(OBJ_DIR)/%$(OBJ_SUFFIX) $(LIB_NAME)
$(LINK_OBJ_TO_EXE)
Index: makefile.bcc
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/makefile.bcc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** makefile.bcc 4 Feb 2004 06:21:59 -0000 1.4
--- makefile.bcc 8 Feb 2004 11:34:11 -0000 1.5
***************
*** 60,88 ****
ifdef STATICLINK
!
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)_s
! IMPLIB_BASENAME = $(PACKAGE5)_s$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(IMPLIB_NAME)
!
else
!
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)
! DLL_BASENAME = $(PACKAGE4)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE4)$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
! EXPDEF_NAME = $(LIB_DIR)/cbar.def
! IMPDEF_NAME = $(LIB_DIR)/impcbar.def
!
endif
-
-
# -------- Check that environment path variables are set. --------
--- 60,82 ----
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)_s
! IMPLIB_BASENAME = $(PACKAGE5)_s$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(IMPLIB_NAME)
else
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)
! DLL_BASENAME = $(PACKAGE4)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE4)$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
! EXPDEF_NAME = $(LIB_DIR)/cbar.def
! IMPDEF_NAME = $(LIB_DIR)/impcbar.def
endif
# -------- Check that environment path variables are set. --------
***************
*** 155,169 ****
- # -------- Set up mktext --------
- ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X))
- ALLEGRO_DAT2C = $(subst /,\,$(ALLEGRO_DAT2C_X))
- CBAR_DAT = $(subst /,\,$(CBAR_DAT_X))
- CBAR_DAT_C = $(subst /,\,$(CBAR_DAT_C_X))
- CBAR_DAT_H = $(subst /,\,$(CBAR_DAT_H_X))
- CBAR_LABELS = $(subst /,\,$(CBAR_LABELS_X))
- TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X))
- TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X))
- MKTEXT = $(subst /,\,$(MKTEXT_X))
-
# -------- give a sensible default target for make without any args --------
--- 149,152 ----
***************
*** 234,239 ****
dinput.lib ddraw.lib winmm.lib dsound.lib
-
-
# -------- List platform specific objects and programs. --------
--- 217,220 ----
***************
*** 247,252 ****
# myprogram: path/myprogram$(EXE_SUFFIX)
-
-
# -------- Define how to compile. --------
--- 228,231 ----
***************
*** 257,268 ****
bcc32 $(COMPILE_FLAGS) -W -I. -I./include -c -o$(subst /,\,$@) $(subst /,\,$<)
endef
- define COMPILE_C_TO_OBJ_NO_OPTIMIZE
- bcc32 $(COMPILE_FLAGS_NO_OPTIMIZE) -W -I. -I./include -c -o$(subst /,\,$@) $(subst /,\,$<)
- endef
-
- COMPILE_S_TO_OBJ_DEPS =
- define COMPILE_S_TO_OBJ
- endef
-
define MAKE_LIB_RSP
$(foreach lib, $(LIB_FLAGS), echo $(subst /,\\,$(lib)) + >> lib.rsp
--- 236,239 ----
***************
*** 288,321 ****
endif
- LINK_ALL_OBJ_TO_EXE_DEPS = lib.rsp
- define DO_LINK_ALL_OBJ_TO_EXE_DEPS
- $(foreach objfile, $(filter %.$(OBJ_SUFFIX),$^), echo $(subst /,\\,$(objfile)) + >> obj.rsp
- )
- ilink32 $(LFLAGS) /aa /Tpe c0w32 @obj.rsp,$(subst /,\,$@),,$(subst /,\,$(IMPLIB_NAME) @lib.rsp)
- del obj.rsp
- endef
- ifdef DELETE_TDS_FILES
- define LINK_ALL_OBJ_TO_EXE
- $(DO_LINK_ALL_OBJ_TO_EXE)
- @del $(subst .exe,.tds,$(subst /,\,$@))
- endef
- else
- LINK_ALL_OBJ_TO_EXE = $(DO_LINK_ALL_OBJ_TO_EXE)
- endif
-
- LINK_CONSOLE_DEPS = $(IMPLIB_NAME) lib.rsp
- define DO_LINK_CONSOLE
- ilink32 $(LFLAGS) /ap /Tpe c0x32 $(subst /,\,$<),$(subst /,\,$@),,$(subst /,\,$(IMPLIB_NAME) @lib.rsp)
- endef
- ifdef DELETE_TDS_FILES
- define LINK_CONSOLE
- $(DO_LINK_CONSOLE)
- @del $(subst .exe,.tds,$(subst /,\,$@))
- endef
- else
- DO_LINK_CONSOLE = $(DO_LINK_CONSOLE)
- endif
-
-
ifdef STATICLINK
# link as a static library
--- 259,262 ----
***************
*** 419,431 ****
uninstall:
-rm -fv $(UNINSTALL_FILES)
@echo All gone!
-
-
- # -------- Compile anything that can't be done in makefile.all. --------
-
- # this section is empty
-
-
# -------- Generate automatic dependencies. --------
--- 360,366 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cbar
@echo All gone!
# -------- Generate automatic dependencies. --------
Index: makefile.dj
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/makefile.dj,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** makefile.dj 4 Feb 2004 06:21:59 -0000 1.3
--- makefile.dj 8 Feb 2004 11:34:11 -0000 1.4
***************
*** 3,13 ****
#
# By Christer Sandberg (ported from Adime made by Sven Sandberg).
- #
# See readme.txt for more information about CBAR
- #
# See makefile.all for a list of the available targets.
-
-
# -------- Define some variables that the primary makefile may use. --------
--- 3,9 ----
***************
*** 36,41 ****
ifndef OBJ_ROOT_DIR
! OBJ_ROOT_DIR = obj
! OBJ_ROOT_DIR_D = obj
endif
OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/djgpp
--- 32,37 ----
ifndef OBJ_ROOT_DIR
! OBJ_ROOT_DIR = obj
! OBJ_ROOT_DIR_D = obj
endif
OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/djgpp
***************
*** 45,50 ****
ifndef LIB_ROOT_DIR
! LIB_ROOT_DIR = lib
! LIB_ROOT_DIR_D = lib
endif
LIB_DIR = $(LIB_ROOT_DIR)/djgpp
--- 41,46 ----
ifndef LIB_ROOT_DIR
! LIB_ROOT_DIR = lib
! LIB_ROOT_DIR_D = lib
endif
LIB_DIR = $(LIB_ROOT_DIR)/djgpp
***************
*** 123,171 ****
ifdef WARNMODE
! WFLAGS = -Wall -W -Werror
! # -Wno-unused
else
! WFLAGS = -Wall -Wno-unused
endif
ifdef PGCC
! OFLAGS = -mcpu=pentium -O6 -ffast-math
! else
! ifdef PENTIUMONLY
! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math
else
! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math
! endif
endif
ifdef DEBUGMODE
! # debugging build
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS)
! LFLAGS = -g3
! LIB_FLAGS = -lccomd -lcguid -lalld
! else
! ifdef PROFILEMODE
! # profiling build
! CFLAGS = $(WFLAGS) $(OFLAGS) -pg
! SFLAGS = $(WFLAGS)
! LFLAGS = -pg
! LIB_FLAGS = -lccom -lcgui -lallp
else
! # optimised build
! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce
! SFLAGS = $(WFLAGS)
! ifndef SYMBOLMODE
! LFLAGS = -s
! LIB_FLAGS = -lccom -lcgui -lalleg
! endif
! endif
endif
ifdef CBAR_DEVELOPING
! CFLAGS += -D_CBAR_DEVELOPING=1
endif
ifdef CBAR_FORTIFY
! CFLAGS += -D_CBAR_FORTIFY=1 -DFORTIFY
endif
--- 119,166 ----
ifdef WARNMODE
! WFLAGS = -Wall -W -Werror
else
! WFLAGS = -Wall -Wno-unused
endif
ifdef PGCC
! OFLAGS = -mcpu=pentium -O6 -ffast-math
else
! ifdef PENTIUMONLY
! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math
! else
! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math
! endif
endif
ifdef DEBUGMODE
! # debugging build
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS)
! LFLAGS = -g3
! LIB_FLAGS = -lccomd -lcguid -lalld
else
! ifdef PROFILEMODE
! # profiling build
! CFLAGS = $(WFLAGS) $(OFLAGS) -pg
! SFLAGS = $(WFLAGS)
! LFLAGS = -pg
! LIB_FLAGS = -lccom -lcgui -lallp
! else
! # optimised build
! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce
! SFLAGS = $(WFLAGS)
! ifndef SYMBOLMODE
! LFLAGS = -s
! LIB_FLAGS = -lccom -lcgui -lalleg
! endif
! endif
endif
ifdef CBAR_DEVELOPING
! CFLAGS += -D_CBAR_DEVELOPING=1
endif
ifdef CBAR_FORTIFY
! CFLAGS += -D_CBAR_FORTIFY=1 -DFORTIFY
endif
***************
*** 200,243 ****
GCC2DJGPP = -DDJGPP=2 -U__unix__
- COMPILE_C_TO_OBJ_DEPS =
define COMPILE_C_TO_OBJ
gcc $(COMPILE_FLAGS) -I./include -o $@ -c $<
endef
- define COMPILE_C_TO_OBJ_NO_OPTIMIZE
- gcc $(COMPILE_FLAGS_NO_OPTIMIZE) -I./include -o $@ -c $<
- endef
- COMPILE_S_TO_OBJ_DEPS =
- define COMPILE_S_TO_OBJ
- gcc $(SFLAGS) -I./include -x assembler-with-cpp -o $@ -c $<
- endef
-
- LINK_OBJ_TO_LIB_DEPS =
define LINK_OBJ_TO_LIB
ar rs $(LIB_NAME) $(LIB_OBJS)
endef
- LINK_OBJ_TO_EXE_DEPS =
define LINK_OBJ_TO_EXE
gcc $(LFLAGS) -o $@ $< $(LIB_NAME) $(LIB_FLAGS)
endef
- LINK_OBJ_TO_EXE_NOLIB_DEPS =
- define LINK_OBJ_TO_EXE_NOLIB
- gcc $(LFLAGS) -o $@ $< $(LIB_FLAGS)
- endef
-
- LINK_ALL_OBJ_TO_EXE_DEPS =
- define LINK_ALL_OBJ_TO_EXE
- gcc $(LFLAGS) -o $@ $^ $(LIB_NAME) $(LIB_FLAGS)
- endef
-
- LINK_ALL_OBJ_TO_EXE_NOLIB_DEPS =
- define LINK_ALL_OBJ_TO_EXE_NOLIB
- gcc $(LFLAGS) -o $@ $^ $(LIB_FLAGS)
- endef
-
-
-
# -------- Rules for installing and removing the library files. --------
--- 195,210 ----
***************
*** 298,301 ****
--- 265,269 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cbar
@echo All gone!
Index: makefile.mgw
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/makefile.mgw,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** makefile.mgw 4 Feb 2004 06:21:59 -0000 1.4
--- makefile.mgw 8 Feb 2004 11:34:11 -0000 1.5
***************
*** 35,59 ****
! ifdef STATICLINK
!
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)_s
! IMPLIB_BASENAME = lib$(PACKAGE5)_s.a
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(IMPLIB_NAME)
!
! else
!
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)
! DLL_BASENAME = $(PACKAGE4)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = lib$(PACKAGE5).a
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
! EXPDEF_NAME = $(LIB_DIR)/cbar.def
!
endif
--- 35,53 ----
! ifdef STATICLINK # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)_s
! IMPLIB_BASENAME = lib$(PACKAGE5)_s.a
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(IMPLIB_NAME)
! else # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)
! DLL_BASENAME = $(PACKAGE4)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = lib$(PACKAGE5).a
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! EXPDEF_NAME = $(LIB_DIR)/cbar.def
! LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
endif
***************
*** 64,83 ****
.PHONY: badwin badming
! ifeq ($(OS),Windows_NT)
! # true 32 bit OS:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(SYSTEMROOT)
! else
! WINSYSDIR = $(SystemRoot)
! endif
! WINSUBDIR = system32
! else
! # DOS based windows:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(WINDIR)
! else
! WINSYSDIR = $(windir)
! endif
! WINSUBDIR = system
endif
--- 58,75 ----
.PHONY: badwin badming
! ifeq ($(OS),Windows_NT) # true 32 bit OS:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(SYSTEMROOT)
! else
! WINSYSDIR = $(SystemRoot)
! endif
! WINSUBDIR = system32
! else # DOS based windows:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(WINDIR)
! else
! WINSYSDIR = $(windir)
! endif
! WINSUBDIR = system
endif
***************
*** 242,351 ****
ifdef CROSSCOMPILE
! DLLWRAP = i386-mingw32msvc-dllwrap
! WINDRES = windres
else
! DLLWRAP = dllwrap
! WINDRES = i386-mingw32msvc-windres
endif
- COMPILE_C_TO_OBJ_DEPS =
define COMPILE_C_TO_OBJ
gcc $(COMPILE_FLAGS) -I./include -o $@ -c $<
endef
- define COMPILE_C_TO_OBJ_NO_OPTIMIZE
- gcc $(COMPILE_FLAGS_NO_OPTIMIZE) -I./include -o $@ -c $<
- endef
-
- COMPILE_S_TO_OBJ_DEPS =
- define COMPILE_S_TO_OBJ
- gcc $(SFLAGS) -I./include -x assembler-with-cpp -o $@ -c $<
- endef
ifdef STATICLINK
! # link as a static library
!
! LINK_OBJ_TO_LIB_DEPS =
! define LINK_OBJ_TO_LIB
! ar rs $(LIB_NAME) $(LIB_OBJS)
! endef
!
! LINK_OBJ_TO_EXE_DEPS =
! define LINK_OBJ_TO_EXE
! gcc $(LFLAGS) -mwindows -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
!
! LINK_OBJ_TO_EXE_NOLIB_DEPS =
! define LINK_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -mwindows -o $@ $< $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_DEPS =
! define LINK_ALL_OBJ_TO_EXE
! gcc $(LFLAGS) -mwindows -o $@ $^ $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_NOLIB_DEPS =
! define LINK_ALL_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -mwindows -o $@ $^ $(LIB_FLAGS)
! endef
!
! LINK_CONSOLE_DEPS =
! define LINK_CONSOLE
! gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
!
! LINK_CONSOLE_NOLIB_DEPS =
! define LINK_CONSOLE_NOLIB
! gcc $(LFLAGS) -o $@ $< $(LIB_FLAGS)
! endef
!
! else
! # link as a DLL
! LINK_OBJ_TO_LIB_DEPS =
! ifdef FASTDLL
! define LINK_OBJ_TO_LIB
! gcc $(LFLAGS) -shared -Wl,--out-implib,$(IMPLIB_NAME),--just-symbols,$(EXPDEF_NAME) -o $(DLL_NAME) $(LIB_OBJS) $(LIB_FLAGS)
! endef
else
! define LINK_OBJ_TO_LIB
! dllwrap --def $(EXPDEF_NAME) -o $(DLL_NAME) $(LIB_OBJS) $(LIB_FLAGS) --output-lib $(IMPLIB_NAME)
! endef
! endif
!
! LINK_OBJ_TO_EXE_DEPS =
! define LINK_OBJ_TO_EXE
! gcc $(LFLAGS) -mwindows -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
!
! LINK_OBJ_TO_EXE_DEPS_NOLIB =
! define LINK_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -mwindows -o $@ $< $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_DEPS =
! define LINK_ALL_OBJ_TO_EXE
! gcc $(LFLAGS) -mwindows -o $@ $^ $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_DEPS_NOLIB =
! define LINK_ALL_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -mwindows -o $@ $^ $(LIB_FLAGS)
! endef
!
! LINK_CONSOLE_DEPS = $(IMPLIB_NAME)
! define LINK_CONSOLE
! gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME)
! endef
!
! LINK_CONSOLE_NOLIB_DEPS =
! define LINK_CONSOLE_NOLIB
! gcc $(LFLAGS) -o $@ $<
! endef
endif # ifdef STATICLINK
-
-
# -------- Rules for installing and removing the library files. --------
--- 234,274 ----
ifdef CROSSCOMPILE
! DLLWRAP = i386-mingw32msvc-dllwrap
! WINDRES = windres
else
! DLLWRAP = dllwrap
! WINDRES = i386-mingw32msvc-windres
endif
define COMPILE_C_TO_OBJ
gcc $(COMPILE_FLAGS) -I./include -o $@ -c $<
endef
ifdef STATICLINK
! # link as a static library
! define LINK_OBJ_TO_LIB
! ar rs $(LIB_NAME) $(LIB_OBJS)
! endef
! define LINK_OBJ_TO_EXE
! gcc $(LFLAGS) -mwindows -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
else
! # link as a DLL
! ifdef FASTDLL
! define LINK_OBJ_TO_LIB
! gcc $(LFLAGS) -shared -Wl,--out-implib,$(IMPLIB_NAME),--just-symbols,$(EXPDEF_NAME) -o $(DLL_NAME) $(LIB_OBJS) $(LIB_FLAGS)
! endef
! else
! define LINK_OBJ_TO_LIB
! dllwrap --def $(EXPDEF_NAME) -o $(DLL_NAME) $(LIB_OBJS) $(LIB_FLAGS) --output-lib $(IMPLIB_NAME)
! endef
! endif
+ define LINK_OBJ_TO_EXE
+ gcc $(LFLAGS) -mwindows -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
+ endef
endif # ifdef STATICLINK
# -------- Rules for installing and removing the library files. --------
***************
*** 413,416 ****
--- 336,340 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cbar
@echo All gone!
Index: makefile.uni
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/makefile.uni,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** makefile.uni 4 Feb 2004 06:21:59 -0000 1.3
--- makefile.uni 8 Feb 2004 11:34:11 -0000 1.4
***************
*** 8,13 ****
# See makefile.all for a list of the available targets.
-
-
# -------- Define some variables that the primary makefile may use. --------
--- 8,11 ----
***************
*** 37,47 ****
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! IMPLIB_BASENAME = lib$(PACKAGE)_s.a
else
! # link as a shared object
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! IMPLIB_BASENAME = lib$(PACKAGE).so
endif
--- 35,45 ----
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! IMPLIB_BASENAME = lib$(PACKAGE)_s.a
else
! # link as a shared object
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! IMPLIB_BASENAME = lib$(PACKAGE).so
endif
***************
*** 71,75 ****
MKTEXT = $(subst \,/,$(MKTEXT_X))
-
# -------- Give a sensible default target for make without any args. --------
# This must be done right after the tests, which can generate error targets.
--- 69,72 ----
***************
*** 83,87 ****
ifdef WARNMODE
WFLAGS = -Wall -W -Werror
- # -Wno-unused
else
WFLAGS = -Wall -Wno-unused
--- 80,83 ----
***************
*** 89,98 ****
ifdef PGCC
! OFLAGS = -mcpu=pentium -O6 -ffast-math
else
ifdef PENTIUMONLY
! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math
else
! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math
endif
endif
--- 85,94 ----
ifdef PGCC
! OFLAGS = -mcpu=pentium -O6 -ffast-math
else
ifdef PENTIUMONLY
! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math
else
! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math
endif
endif
***************
*** 127,134 ****
ifdef CBAR_DEVELOPING
! CFLAGS += -D_CBAR_DEVELOPING=1
endif
ifdef CBAR_FORTIFY
! CFLAGS += -D_CBAR_FORTIFY=1 -DFORTIFY
endif
--- 123,130 ----
ifdef CBAR_DEVELOPING
! CFLAGS += -D_CBAR_DEVELOPING=1
endif
ifdef CBAR_FORTIFY
! CFLAGS += -D_CBAR_FORTIFY=1 -DFORTIFY
endif
***************
*** 139,147 ****
ifdef STATICLINK
! COMPILE_FLAGS += -DCBAR_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
ifdef PROFILEMODE
! LIB_FLAGS += -lgmon
endif
--- 135,143 ----
ifdef STATICLINK
! COMPILE_FLAGS += -DCBAR_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
ifdef PROFILEMODE
! LIB_FLAGS += -lgmon
endif
***************
*** 165,237 ****
GCC2UNIX = -D__UNIX__ -UDJGPP
- COMPILE_C_TO_OBJ_DEPS =
define COMPILE_C_TO_OBJ
! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $<
! endef
! define COMPILE_C_TO_OBJ_NO_OPTIMIZE
! gcc $(COMPILE_FLAGS_NO_OPTIMIZE) -I./include -o $@ -c $<
! endef
!
! COMPILE_S_TO_OBJ_DEPS =
! define COMPILE_S_TO_OBJ
! gcc $(SFLAGS) -I./include -x assembler-with-cpp -o $@ -c $<
endef
ifdef STATICLINK
! # link as a static library
!
! LINK_OBJ_TO_LIB_DEPS =
! define LINK_OBJ_TO_LIB
! ar rs $(LIB_NAME) $(LIB_OBJS)
! endef
!
! LINK_OBJ_TO_EXE_DEPS =
! define LINK_OBJ_TO_EXE
! gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
!
! LINK_OBJ_TO_EXE_NOLIB_DEPS =
! define LINK_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -o $@ $< $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_DEPS =
! define LINK_ALL_OBJ_TO_EXE
! gcc $(LFLAGS) -o $@ $^ $(IMPLIB_NAME) $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_NOLIB_DEPS =
! define LINK_ALL_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -o $@ $^
! endef
else
! # link as a shared object
!
! LINK_OBJ_TO_LIB_DEPS =
! define LINK_OBJ_TO_LIB
! gcc $(LFLAGS) -shared -o $(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS)
! endef
!
! LINK_OBJ_TO_EXE_DEPS =
! define LINK_OBJ_TO_EXE
! gcc $(LFLAGS) -o $@ $< -L$(LIB_DIR) -lcbar $(LIB_FLAGS)
! endef
!
! LINK_OBJ_TO_EXE_NOLIB_DEPS =
! define LINK_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -o $@ $< $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_DEPS =
! define LINK_ALL_OBJ_TO_EXE
! gcc $(LFLAGS) -o $@ $^ -L$(LIB_DIR) -lcbar $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_NOLIB_DEPS =
! define LINK_ALL_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -o $@ $^
! endef
endif # ifdef STATICLINK
--- 161,186 ----
GCC2UNIX = -D__UNIX__ -UDJGPP
define COMPILE_C_TO_OBJ
! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $<
endef
ifdef STATICLINK
! # link as a static library
! define LINK_OBJ_TO_LIB
! ar rs $(LIB_NAME) $(LIB_OBJS)
! endef
+ define LINK_OBJ_TO_EXE
+ gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
+ endef
else
! # link as a shared object
! define LINK_OBJ_TO_LIB
! gcc $(LFLAGS) -shared -o $(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS)
! endef
+ define LINK_OBJ_TO_EXE
+ gcc $(LFLAGS) -o $@ $< -L$(LIB_DIR) -lcbar $(LIB_FLAGS)
+ endef
endif # ifdef STATICLINK
Index: makefile.vc
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/makefile.vc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** makefile.vc 4 Feb 2004 06:21:59 -0000 1.4
--- makefile.vc 8 Feb 2004 11:34:11 -0000 1.5
***************
*** 36,41 ****
ifndef LIB_ROOT_DIR
! LIB_ROOT_DIR = lib
! LIB_ROOT_DIR_D = lib
endif
LIB_DIR = $(LIB_ROOT_DIR)/msvc
--- 36,41 ----
ifndef LIB_ROOT_DIR
! LIB_ROOT_DIR = lib
! LIB_ROOT_DIR_D = lib
endif
LIB_DIR = $(LIB_ROOT_DIR)/msvc
***************
*** 44,71 ****
ifdef STATICLINK
!
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)_s
! IMPLIB_BASENAME = $(PACKAGE5)_s$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(IMPLIB_NAME)
!
else
!
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)
! DLL_BASENAME = $(PACKAGE4)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE4)$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
! EXPDEF_NAME = $(LIB_DIR)/cbar.def
!
endif
-
-
# -------- Check that environment path variables are set. --------
--- 44,65 ----
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)_s
! IMPLIB_BASENAME = $(PACKAGE5)_s$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(IMPLIB_NAME)
else
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE5)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE5)
! DLL_BASENAME = $(PACKAGE4)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE4)$(LIB_SUFFIX)
! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME)
! LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
! EXPDEF_NAME = $(LIB_DIR)/cbar.def
endif
# -------- Check that environment path variables are set. --------
***************
*** 73,96 ****
ifeq ($(OS),Windows_NT)
! # true 32 bit OS:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(SYSTEMROOT)
! else
! WINSYSDIR = $(SystemRoot)
! endif
! WINSUBDIR = system32
! else
! # DOS based windows:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(WINDIR)
else
! WINSYSDIR = $(windir)
! endif
! WINSUBDIR = system
endif
ifneq ($(WINSYSDIR),)
! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR))
! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR))
else
badwin:
--- 67,90 ----
ifeq ($(OS),Windows_NT)
! # true 32 bit OS:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(SYSTEMROOT)
! else
! WINSYSDIR = $(SystemRoot)
! endif
! WINSUBDIR = system32
else
! # DOS based windows:
! ifeq ($(TERM),msys)
! WINSYSDIR = $(WINDIR)
! else
! WINSYSDIR = $(windir)
! endif
! WINSUBDIR = system
endif
ifneq ($(WINSYSDIR),)
! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR))
! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR))
else
badwin:
***************
*** 150,160 ****
endif
! # -------- Setup runner --------
!
! RUNNER := obj/msvc/runner.exe
! RUNNER_DEP := obj/msvc/runner.exe
! define COMPILE_RUNNER
! gcc -O -Wall -Werror -o $(RUNNER) $(RUNNER_SOURCE)
! endef
# -------- Set up mktext --------
--- 144,148 ----
endif
! RUNNER = $(CGUIDIR)/obj/msvc/runner$(EXE_SUFFIX)
# -------- Set up mktext --------
***************
*** 189,193 ****
LFLAGS = -debug -debugtype:cv
! ifdef STATICLINK
LIB_FLAGS = ccomd_s.lib cguid_s.lib alld_s.lib
else
--- 177,181 ----
LFLAGS = -debug -debugtype:cv
! ifdef STATICLINK
LIB_FLAGS = ccomd_s.lib cguid_s.lib alld_s.lib
else
***************
*** 200,204 ****
SFLAGS = -Wall
LFLAGS = -profile
-
ifdef STATICLINK
LIB_FLAGS = ccom_s.lib cgui_s.lib allp_s.lib
--- 188,191 ----
***************
*** 207,211 ****
endif
else
! # -------- optimised build --------
CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
SFLAGS = -Wall
--- 194,198 ----
endif
else
! # -------- optimised build --------
CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
SFLAGS = -Wall
***************
*** 220,227 ****
ifdef CBAR_DEVELOPING
! CFLAGS += -D_CBAR_DEVELOPING=1
endif
ifdef CBAR_FORTIFY
! CFLAGS += -D_CBAR_FORTIFY=1 -DFORTIFY
endif
--- 207,214 ----
ifdef CBAR_DEVELOPING
! CFLAGS += -D_CBAR_DEVELOPING=1
endif
ifdef CBAR_FORTIFY
! CFLAGS += -D_CBAR_FORTIFY=1 -DFORTIFY
endif
***************
*** 238,243 ****
dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib
-
-
# -------- List platform specific objects and programs. --------
--- 225,228 ----
***************
*** 251,323 ****
# myprogram: path/myprogram$(EXE_SUFFIX)
-
-
# -------- Define how to compile. --------
GCC2MSVC = -D_MSC_VER -D_WIN32 -D_M_IX86 -U__GNUC__ -UDJGPP -U__unix__
- COMPILE_C_TO_OBJ_DEPS = $(RUNNER_DEP)
define COMPILE_C_TO_OBJ
$(RUNNER) cl @ -nologo $(COMPILE_FLAGS) -I./include -Fo$@ -c $<
endef
- define COMPILE_C_TO_OBJ_NO_OPTIMIZE
- $(RUNNER) cl @ -nologo $(COMPILE_FLAGS_NO_OPTIMIZE) -I./include -Fo$@ -c $<
- endef
-
- COMPILE_S_TO_OBJ_DEPS = $(RUNNER_DEP)
- define COMPILE_S_TO_OBJ
- gcc $(GCC2MSVC) $(SFLAGS) -I./include -x assembler-with-cpp -o $@ -c $<
- endef
- LINK_OBJ_TO_EXE_DEPS = $(RUNNER_DEP)
define LINK_OBJ_TO_EXE
$(RUNNER) link @ -nologo $(LFLAGS) -subsystem:windows -out:$@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
endef
- LINK_OBJ_TO_EXE_NOLIB_DEPS = $(RUNNER_DEP)
- define LINK_OBJ_TO_EXE_NOLIB
- $(RUNNER) link @ -nologo $(LFLAGS) -subsystem:windows -out:$@ $< $(LIB_FLAGS)
- endef
-
- LINK_ALL_OBJ_TO_EXE_DEPS = $(RUNNER_DEP)
- define LINK_ALL_OBJ_TO_EXE
- $(RUNNER) link @ -nologo $(LFLAGS) -subsystem:windows -out:$@ $(filter-out $(RUNNER_DEP),$^) $(IMPLIB_NAME) $(LIB_FLAGS)
- endef
-
- LINK_ALL_OBJ_TO_EXE_NOLIB_DEPS = $(RUNNER_DEP)
- define LINK_ALL_OBJ_TO_EXE_NOLIB
- $(RUNNER) link @ -nologo $(LFLAGS) -subsystem:console -out:$@ $(filter-out $(RUNNER_DEP),$^) $(LIB_FLAGS)
- endef
-
- LINK_CONSOLE_DEPS = $(IMPLIB_NAME) $(RUNNER_DEP)
- define LINK_CONSOLE
- $(RUNNER) link @ -nologo $(LFLAGS) -subsystem:console -out:$@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
- endef
-
- LINK_CONSOLE_NOLIB_DEPS = $(RUNNER_DEP)
- define LINK_CONSOLE_NOLIB
- $(RUNNER) link @ -nologo $(LFLAGS) -subsystem:console -out:$@ $< $(LIB_FLAGS)
- endef
-
ifdef STATICLINK
! # link as a static library
!
! LINK_OBJ_TO_LIB_DEPS = $(RUNNER_DEP)
! define LINK_OBJ_TO_LIB
! $(RUNNER) lib @ -nologo -out:$(LIB_NAME) $(LIB_OBJS)
! endef
!
else
! # link as a DLL
!
! LINK_OBJ_TO_LIB_DEPS = $(RUNNER_DEP)
! define LINK_OBJ_TO_LIB
! $(RUNNER) link @ -nologo $(LFLAGS) -dll -def:$(EXPDEF_NAME) -out:$(DLL_NAME) -implib:$(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS)
! endef
!
endif # ifdef STATICLINK
-
-
# -------- Rules for installing and removing the library files. --------
--- 236,263 ----
# myprogram: path/myprogram$(EXE_SUFFIX)
# -------- Define how to compile. --------
GCC2MSVC = -D_MSC_VER -D_WIN32 -D_M_IX86 -U__GNUC__ -UDJGPP -U__unix__
define COMPILE_C_TO_OBJ
$(RUNNER) cl @ -nologo $(COMPILE_FLAGS) -I./include -Fo$@ -c $<
endef
define LINK_OBJ_TO_EXE
$(RUNNER) link @ -nologo $(LFLAGS) -subsystem:windows -out:$@ $< $(IMPLIB_NAME) $(LIB_FLAGS)
endef
ifdef STATICLINK
! # link as a static library
! define LINK_OBJ_TO_LIB
! $(RUNNER) lib @ -nologo -out:$(LIB_NAME) $(LIB_OBJS)
! endef
else
! # link as a DLL
! define LINK_OBJ_TO_LIB
! $(RUNNER) link @ -nologo $(LFLAGS) -dll -def:$(EXPDEF_NAME) -out:$(DLL_NAME) -implib:$(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS)
! endef
endif # ifdef STATICLINK
# -------- Rules for installing and removing the library files. --------
***************
*** 382,394 ****
uninstall:
-rm -fv $(UNINSTALL_FILES)
@echo All gone!
-
-
- # -------- Compile anything that can't be done in makefile.all. --------
-
- # this section is empty
-
-
# -------- Generate automatic dependencies. --------
--- 322,328 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cbar
@echo All gone!
# -------- Generate automatic dependencies. --------
Index: makefile.ver
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/makefile.ver,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** makefile.ver 9 Dec 2003 18:48:39 -0000 1.3
--- makefile.ver 8 Feb 2004 11:34:11 -0000 1.4
***************
*** 7,10 ****
# Shared library versions for Unix
# todo: this is unused at the moment
! shared_version = 1.0.1
shared_major_minor = 1.0
--- 7,10 ----
# Shared library versions for Unix
# todo: this is unused at the moment
! shared_version = 1.0.2
shared_major_minor = 1.0
Index: zipup.sh
===================================================================
RCS file: /cvsroot/cbar/cbar/misc/zipup.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** zipup.sh 9 Dec 2003 18:48:39 -0000 1.4
--- zipup.sh 8 Feb 2004 11:34:11 -0000 1.5
***************
*** 12,17 ****
# note: these are patched by fixver.sh script.
! zipversion=101
! tgzversion=1.0.1
if [ "$1" != "-q" ]; then
--- 12,17 ----
# note: these are patched by fixver.sh script.
! zipversion=102
! tgzversion=1.0.2
if [ "$1" != "-q" ]; then
***************
*** 59,69 ****
misc/dllsyms.lst misc/scanexp.c \
obj/*/*/*.dep lib/*/*.def \
! readme.txt readme.html docs/readme.info \
docs/*._tx \
src/*.c src/*.h src/*.t src/*.ht \
! examples/*.c examples/*.txt examples/*.cfg examples/*.dat \
! include/*.h include/cbar/*.h \
! misc/runner.c \
! misc/makedoc/*.c misc/makedoc/*.h"
afiles=`echo $files | sed -e"s/\([^ ][^ ]*\)/ cbar\/\1/g"`
--- 59,68 ----
misc/dllsyms.lst misc/scanexp.c \
obj/*/*/*.dep lib/*/*.def \
! docs/readme.txt docs/readme.html docs/cbar.html docs/cbar.txt \
docs/*._tx \
src/*.c src/*.h src/*.t src/*.ht \
! examples/*.c examples/*.cfg \
! resource/* \
! include/*.h include/cbar/*.h
afiles=`echo $files | sed -e"s/\([^ ][^ ]*\)/ cbar\/\1/g"`
|