Update of /cvsroot/cpri/cpri/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18127/misc
Modified Files:
makefile.all makefile.bcc makefile.dj makefile.mgw
makefile.uni makefile.vc zipup.sh
Removed Files:
makefile.doc
Log Message:
Some more makefile cleanup/improvements
Index: makefile.all
===================================================================
RCS file: /cvsroot/cpri/cpri/misc/makefile.all,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** makefile.all 1 Feb 2004 17:09:16 -0000 1.6
--- makefile.all 8 Feb 2004 11:35:56 -0000 1.7
***************
*** 63,67 ****
RUNNER_SOURCE = misc/runner.c
! EXAMPLES_SOURCE = ex.c
MAKEDOC_PROGRAM := $(CGUIDIR)/misc/makedoc/makedoc$(EXE_SUFFIX)
--- 63,67 ----
RUNNER_SOURCE = misc/runner.c
! EXAMPLES_SOURCE = 1_pri.c
MAKEDOC_PROGRAM := $(CGUIDIR)/misc/makedoc/makedoc$(EXE_SUFFIX)
***************
*** 94,109 ****
endif
- # By default, Allegro is linked the same way as cpri, but this can be
- # overridden.
- # Note that it is not a good idea to do anything particular with the
- # STATICLINK_ALLEGRO or NO_STATICLINK_ALLEGRO variables, since it would be
- # bad to have two dlls around with the same name that link differently to
- # Allegro.
- ifdef STATICLINK
- ifndef NO_STATICLINK_ALLEGRO
- STATICLINK_ALLEGRO=1
- endif
- endif
-
# -------- Include platform specific makefile. --------
--- 94,97 ----
***************
*** 127,132 ****
EXAMPLES_NAME = $(addprefix examples/,$(addsuffix $(EXE_SUFFIX),$(basename $(EXAMPLES_SOURCE))))
-
-
# -------- Compile --------
--- 115,118 ----
***************
*** 165,169 ****
veryclean:
! -rm -fv $(VERY_CLEAN_FILES)
compress:
--- 151,155 ----
veryclean:
! -rm -fv $(VERY_CLEAN_FILES)
compress:
***************
*** 175,185 ****
endif
! $(OBJ_DIR)/%$(OBJ_SUFFIX): %.c $(COMPILE_C_TO_OBJ_DEPS) $(SYSTEM_INCLUDE_DIR)/cgui.h
$(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)
--- 161,171 ----
endif
! $(OBJ_DIR)/%$(OBJ_SUFFIX): %.c $(SYSTEM_INCLUDE_DIR)/cgui.h
$(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)
***************
*** 256,261 ****
whisped -f3t3olke1d misc/makefile.* misc/emptymak
-
- # -------- Dependencies. --------
-
- -include $(OBJ_DIR)/makefile.dep
--- 242,243 ----
Index: makefile.bcc
===================================================================
RCS file: /cvsroot/cpri/cpri/misc/makefile.bcc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** makefile.bcc 1 Feb 2004 17:09:16 -0000 1.5
--- makefile.bcc 8 Feb 2004 11:35:56 -0000 1.6
***************
*** 48,64 ****
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s
! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX)
else
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)
! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX)
! EXPDEF_NAME = $(LIB_DIR)/cpri.def
! IMPDEF_NAME = $(LIB_DIR)/impcpri.def
endif
--- 48,64 ----
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s
! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX)
else
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)
! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX)
! EXPDEF_NAME = $(LIB_DIR)/cpri.def
! IMPDEF_NAME = $(LIB_DIR)/impcpri.def
endif
***************
*** 71,89 ****
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
--- 71,89 ----
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
***************
*** 105,109 ****
endif
-
SYSTEM_INCLUDE_DIR = $(BCC32DIR_U)/include
SYSTEM_INCLUDE_DIR_D = $(BCC32DIR_D)\include
--- 105,108 ----
***************
*** 111,137 ****
SYSTEM_LIB_DIR_D = $(BCC32DIR_D)\lib
-
- # -------- Find Allegro, runner and makedoc. --------
-
- NEED_ALLEGRO = 1
-
- .PHONY: badalleg
-
- ifdef ALLEGRO
- ALLEGRODIR_U = $(subst \,/,$(ALLEGRO))
- else
- badalleg:
- @echo Couldnt find Allegro!
- @echo Is your ALLEGRO environment variable set correctly? It should
- @echo point to the place where Allegro lives, e.g.
- @echo "set ALLEGRO=c:\allegro".
- endif
-
-
- ifdef NEED_MAKEDOC
- include misc/makefile.doc
- endif
-
-
ifdef UNIX_TOOLS
# -------- Set up mktext --------
--- 110,113 ----
***************
*** 171,175 ****
-
# -------- decide what compiler options to use --------
--- 147,150 ----
***************
*** 181,223 ****
ifdef DEBUGMODE
! # -------- debugging build --------
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Od -q -R -v
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE)
! LFLAGS = /q /Gn /v
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cguid_s.lib alld_s.lib
! else
! LIB_FLAGS = cguid.lib alld.lib
! endif
! else
! ifdef PROFILEMODE
! # -------- profiling build --------
! CFLAGS = $(WFLAGS) -O2 -OS -q -R -v
! SFLAGS = $(WFLAGS)
! LFLAGS = /q /Gn /v
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib allp_s.lib
! else
! LIB_FLAGS = cgui.lib allp.lib
! endif
! else
! # -------- optimised build --------
! CFLAGS = $(WFLAGS) -O2 -OS -q
! SFLAGS = $(WFLAGS)
! LFLAGS = /x /q /Gn
! DELETE_TDS_FILES = 1
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib alleg_s.lib
else
! LIB_FLAGS = cgui.lib alleg.lib
! endif
! endif
endif
ifdef CPRI_DEVELOPING
! CFLAGS += -D_CPRI_DEVELOPING=1
endif
ifdef CPRI_FORTIFY
! CFLAGS += -D_CPRI_FORTIFY=1 -DFORTIFY
endif
--- 156,198 ----
ifdef DEBUGMODE
! # -------- debugging build --------
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Od -q -R -v
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE)
! LFLAGS = /q /Gn /v
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cguid_s.lib alld_s.lib
! else
! LIB_FLAGS = cguid.lib alld.lib
! endif
else
! ifdef PROFILEMODE
! # -------- profiling build --------
! CFLAGS = $(WFLAGS) -O2 -OS -q -R -v
! SFLAGS = $(WFLAGS)
! LFLAGS = /q /Gn /v
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib allp_s.lib
! else
! LIB_FLAGS = cgui.lib allp.lib
! endif
! else
! # -------- optimised build --------
! CFLAGS = $(WFLAGS) -O2 -OS -q
! SFLAGS = $(WFLAGS)
! LFLAGS = /x /q /Gn
! DELETE_TDS_FILES = 1
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib alleg_s.lib
! else
! LIB_FLAGS = cgui.lib alleg.lib
! endif
! endif
endif
ifdef CPRI_DEVELOPING
! CFLAGS += -D_CPRI_DEVELOPING=1
endif
ifdef CPRI_FORTIFY
! CFLAGS += -D_CPRI_FORTIFY=1 -DFORTIFY
endif
***************
*** 228,232 ****
ifdef STATICLINK
! COMPILE_FLAGS += -DCPRI_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
--- 203,207 ----
ifdef STATICLINK
! COMPILE_FLAGS += -DCPRI_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
***************
*** 257,267 ****
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
--- 232,235 ----
***************
*** 288,336 ****
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
!
! LINK_OBJ_TO_LIB_DEPS =
! define LINK_OBJ_TO_LIB
! $(foreach objfile, $(LIB_OBJS), tlib /P32 $(subst /,\,$(LIB_NAME) + $(objfile))
)
! @del $(subst /,\,$(subst .lib,.BAK,$(LIB_NAME)))
! endef
!
else
! # link as a DLL
!
! LINK_OBJ_TO_LIB_DEPS = lib.rsp
! define DO_LINK_OBJ_TO_LIB
-del libobj.rsp
$(foreach libobjfile, $(LIB_OBJS), echo $(subst /,\\,$(libobjfile)) + >> libobj.rsp
--- 256,271 ----
endif
ifdef STATICLINK
! # link as a static library
! LINK_OBJ_TO_LIB_DEPS =
! define LINK_OBJ_TO_LIB
! $(foreach objfile, $(LIB_OBJS), tlib /P32 $(subst /,\,$(LIB_NAME) + $(objfile))
)
! @del $(subst /,\,$(subst .lib,.BAK,$(LIB_NAME)))
! endef
else
! # link as a DLL
! LINK_OBJ_TO_LIB_DEPS = lib.rsp
! define DO_LINK_OBJ_TO_LIB
-del libobj.rsp
$(foreach libobjfile, $(LIB_OBJS), echo $(subst /,\\,$(libobjfile)) + >> libobj.rsp
***************
*** 352,360 ****
LINK_OBJ_TO_LIB = $(DO_LINK_OBJ_TO_LIB)
endif
-
endif # ifdef STATICLINK
-
# -------- Rules for installing and removing the library files. --------
--- 287,293 ----
***************
*** 419,422 ****
--- 352,356 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cpri
@echo All gone!
Index: makefile.dj
===================================================================
RCS file: /cvsroot/cpri/cpri/misc/makefile.dj,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** makefile.dj 1 Feb 2004 17:09:16 -0000 1.5
--- makefile.dj 8 Feb 2004 11:35:56 -0000 1.6
***************
*** 9,13 ****
-
# -------- Define some variables that the primary makefile may use. --------
--- 9,12 ----
***************
*** 77,113 ****
- # -------- Find Allegro and makedoc. --------
-
- ifdef NEED_MAKEDOC
- ifndef NEED_ALLEGRO
- ifeq ($(wildcard $(MAKEDOC_SOURCE)),)
- NEED_ALLEGRO = 1
- endif
- endif
- endif
-
- ifdef NEED_ALLEGRO
- .PHONY: badalleg
-
- ifdef ALLEGRO
- ALLEGRODIR_U = $(subst \,/,$(ALLEGRO))
- else
- badalleg:
- @echo Couldnt find Allegro!
- @echo Is your ALLEGRO environment variable set correctly? It should
- @echo point to the place where Allegro lives, e.g. c:\djgpp\allegro. Run
- @echo set ALLEGRO=c:\djgpp\allegro
- @echo (or whatever the location of Allegro is).
- @echo See also readme.txt
- endif
-
- endif # ifdef NEED_ALLEGRO
-
-
- ifdef NEED_MAKEDOC
- include misc/makefile.doc
- endif
-
-
ifdef UNIX_TOOLS
# -------- Set up mktext --------
--- 76,79 ----
***************
*** 153,157 ****
ifdef WARNMODE
WFLAGS = -Wall -W -Werror
- # -Wno-unused
else
WFLAGS = -Wall -Wno-unused
--- 119,122 ----
***************
*** 169,200 ****
ifdef DEBUGMODE
! # debugging build
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS)
! LFLAGS = -g3
! LIB_FLAGS = -lcguid -lalld
! else
! ifdef PROFILEMODE
! # profiling build
! CFLAGS = $(WFLAGS) $(OFLAGS) -pg
! SFLAGS = $(WFLAGS)
! LFLAGS = -pg
! LIB_FLAGS = -lcgui -lallp
else
! # optimised build
! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce
! SFLAGS = $(WFLAGS)
! ifndef SYMBOLMODE
! LFLAGS = -s
! LIB_FLAGS = -lcgui -lalleg
! endif
! endif
endif
ifdef CPRI_DEVELOPING
! CFLAGS += -D_CPRI_DEVELOPING=1
endif
ifdef CPRI_FORTIFY
! CFLAGS += -D_CPRI_FORTIFY=1 -DFORTIFY
endif
--- 134,165 ----
ifdef DEBUGMODE
! # debugging build
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS)
! LFLAGS = -g3
! LIB_FLAGS = -lcguid -lalld
else
! ifdef PROFILEMODE
! # profiling build
! CFLAGS = $(WFLAGS) $(OFLAGS) -pg
! SFLAGS = $(WFLAGS)
! LFLAGS = -pg
! LIB_FLAGS = -lcgui -lallp
! else
! # optimised build
! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce
! SFLAGS = $(WFLAGS)
! ifndef SYMBOLMODE
! LFLAGS = -s
! LIB_FLAGS = -lcgui -lalleg
! endif
! endif
endif
ifdef CPRI_DEVELOPING
! CFLAGS += -D_CPRI_DEVELOPING=1
endif
ifdef CPRI_FORTIFY
! CFLAGS += -D_CPRI_FORTIFY=1 -DFORTIFY
endif
***************
*** 210,215 ****
COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCPRI_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE)
-
-
# -------- List platform specific objects and programs. --------
--- 175,178 ----
***************
*** 223,294 ****
# myprogram: path/myprogram$(EXE_SUFFIX)
-
-
# -------- Define how to compile. --------
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. --------
- ifdef CROSSCOMPILE
-
- $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME)
- cp $(subst \,/,$< $@)
-
- $(SYSTEM_INCLUDE_DIR)/cpri.h: include/cpri.h
- cp $(subst \,/,$< $@)
-
- $(SYSTEM_INCLUDE_DIR)/cpri:
- mkdir $(subst \,/,$< $@)
-
- $(SYSTEM_INCLUDE_DIR)/cpri/%.h: include/cpri/%.h include/cpri
- cp $(subst \,/,$< $@)
-
- $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX)
- cp $(subst \,/,$< $@)
- install-info $(subst \,/,$@) $(SYSTEM_INFO_DIR)/dir
-
- else # ifdef CROSSCOMPILE
-
$(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME)
copy $(subst /,\,$< $@)
--- 186,207 ----
***************
*** 307,312 ****
install-info $(subst /,\,$@) $(SYSTEM_INFO_DIR)/dir
- endif # ifdef CROSSCOMPILE else
-
INSTALL_HEADERS = $(addprefix $(DJGPPDIR_U)/,$(wildcard include/cpri/*.h))
--- 220,223 ----
***************
*** 327,339 ****
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. --------
--- 238,245 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cpri
@echo All gone!
# -------- Generate automatic dependencies. --------
Index: makefile.mgw
===================================================================
RCS file: /cvsroot/cpri/cpri/misc/makefile.mgw,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** makefile.mgw 1 Feb 2004 17:09:16 -0000 1.6
--- makefile.mgw 8 Feb 2004 11:35:56 -0000 1.7
***************
*** 9,13 ****
-
# -------- Define some variables that the primary makefile may use. --------
--- 9,12 ----
***************
*** 38,54 ****
LIB_DIR_D = $(LIB_ROOT_DIR)\mingw32
! ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s
! IMPLIB_BASENAME = lib$(PACKAGE)_s.a
! else
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)
! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = lib$(PACKAGE).a
! EXPDEF_NAME = $(LIB_DIR)/cpri.def
endif
--- 37,51 ----
LIB_DIR_D = $(LIB_ROOT_DIR)\mingw32
! ifdef STATICLINK # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s
! IMPLIB_BASENAME = lib$(PACKAGE)_s.a
! else # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)
! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = lib$(PACKAGE).a
! EXPDEF_NAME = $(LIB_DIR)/cpri.def
endif
***************
*** 60,89 ****
.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
ifneq ($(WINSYSDIR),)
! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR))
! WINDIR_D = $(subst /,\,$(WINSYSDIR)\$(WINSUBDIR))
else
! ifndef CROSSCOMPILE
badwin:
@echo Your SYSTEMROOT or WINDIR environment variable is not set!
! endif
endif
--- 57,84 ----
.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
ifneq ($(WINSYSDIR),)
! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR))
! WINDIR_D = $(subst /,\,$(WINSYSDIR)\$(WINSUBDIR))
else
! ifndef CROSSCOMPILE
badwin:
@echo Your SYSTEMROOT or WINDIR environment variable is not set!
! endif
endif
***************
*** 134,168 ****
- # -------- Find Allegro and makedoc. --------
-
- ifdef NEED_MAKEDOC
- ifndef NEED_ALLEGRO
- ifeq ($(wildcard $(MAKEDOC_SOURCE)),)
- NEED_ALLEGRO = 1
- endif
- endif
- endif
-
- ifdef NEED_ALLEGRO
- .PHONY: badalleg
-
- ifdef ALLEGRO
- ALLEGRODIR_U = $(subst \,/,$(ALLEGRO))
- else
- badalleg:
- @echo Couldnt find Allegro!
- @echo Is your ALLEGRO environment variable set correctly? It should
- @echo point to the place where Allegro lives, e.g. c:\mingw32\allegro.
- endif
-
- endif # ifdef NEED_ALLEGRO
-
-
- ifdef NEED_MAKEDOC
- include misc/makefile.doc
- endif
-
-
-
# -------- Give a sensible default target for make without any args. --------
# This must be done right after the tests, which can generate error targets.
--- 129,132 ----
***************
*** 172,177 ****
_default: default
-
-
# -------- Decide what compiler options and libraries to use. --------
--- 136,139 ----
***************
*** 246,250 ****
COMPILE_FLAGS = $(subst src/,-DCPRI_SRC ,$(findstring src/, $<))$(CFLAGS)
- COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCPRI_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE)
ifdef STATICLINK
--- 208,211 ----
***************
*** 280,412 ****
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) -lwinspool -lgdi32 $(LIB_FLAGS)
! endef
else
! define LINK_OBJ_TO_LIB
! dllwrap --def $(EXPDEF_NAME) -o $(DLL_NAME) $(LIB_OBJS) -lwinspool -lgdi32 $(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. --------
- ifdef CROSSCOMPILE
-
- ifndef STATICLINK
- $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME)
- cp $(subst \,/,$< $@)
- endif
-
- $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME)
- cp $(subst \,/,$< $@)
-
- $(SYSTEM_INCLUDE_DIR)/cpri.h: include/cpri.h
- cp $(subst \,/,$< $@)
-
- $(SYSTEM_INCLUDE_DIR)/cpri:
- mkdir $(subst \,/,$@)
-
- $(SYSTEM_INCLUDE_DIR)/cpri/%.h: include/cpri/%.h include/cpri
- cp $(subst \,/,$< $@)
-
- else # ifdef CROSSCOMPILE
-
ifndef STATICLINK
$(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME)
--- 241,284 ----
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) -lwinspool -lgdi32 $(LIB_FLAGS)
! endef
! else
! define LINK_OBJ_TO_LIB
! dllwrap --def $(EXPDEF_NAME) -o $(DLL_NAME) $(LIB_OBJS) -lwinspool -lgdi32 $(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. --------
ifndef STATICLINK
$(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME)
***************
*** 426,431 ****
copy $(subst /,\,$< $@)
- endif # ifdef CROSSCOMPILE else
-
INSTALL_HEADERS = $(addprefix $(MINGDIR_U)/,$(wildcard include/cpri/*.h))
--- 298,301 ----
***************
*** 436,444 ****
$(INSTALL_HEADERS)
- ifndef CROSSCOMPILE
ifndef STATICLINK
INSTALL_FILES += $(WINDIR_U)/$(DLL_BASENAME)
endif
- endif
install: $(INSTALL_FILES)
--- 306,312 ----
***************
*** 451,454 ****
--- 319,323 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cpri
@echo All gone!
Index: makefile.uni
===================================================================
RCS file: /cvsroot/cpri/cpri/misc/makefile.uni,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** makefile.uni 1 Feb 2004 20:04:44 -0000 1.7
--- makefile.uni 8 Feb 2004 11:35:56 -0000 1.8
***************
*** 3,13 ****
#
# By Christer Sandberg (copied from ADIME made by Sven Sandberg)
- #
# See readme.txt for more information about CPRI.
- #
# See makefile.all for a list of the available targets.
-
-
# -------- Define some variables that the primary makefile may use. --------
--- 3,9 ----
***************
*** 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
--- 33,43 ----
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
***************
*** 52,56 ****
ifndef SYSTEM_DIR
! SYSTEM_DIR = /usr/local
endif
SYSTEM_INCLUDE_DIR = $(SYSTEM_DIR)/include
--- 48,52 ----
ifndef SYSTEM_DIR
! SYSTEM_DIR = /usr/local
endif
SYSTEM_INCLUDE_DIR = $(SYSTEM_DIR)/include
***************
*** 127,134 ****
ifdef CPRI_DEVELOPING
! CFLAGS += -D_CPRI_DEVELOPING=1
endif
ifdef CPRI_FORTIFY
! CFLAGS += -D_CPRI_FORTIFY=1 -DFORTIFY
endif
--- 123,130 ----
ifdef CPRI_DEVELOPING
! CFLAGS += -D_CPRI_DEVELOPING=1
endif
ifdef CPRI_FORTIFY
! CFLAGS += -D_CPRI_FORTIFY=1 -DFORTIFY
endif
***************
*** 139,151 ****
ifdef STATICLINK
! COMPILE_FLAGS += -DCPRI_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
ifdef PROFILEMODE
! LIB_FLAGS += -lgmon
endif
-
-
# -------- List platform specific objects and programs. --------
--- 135,145 ----
ifdef STATICLINK
! COMPILE_FLAGS += -DCPRI_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
ifdef PROFILEMODE
! LIB_FLAGS += -lgmon
endif
# -------- List platform specific objects and programs. --------
***************
*** 159,241 ****
# myprogram: path/myprogram$(EXE_SUFFIX)
-
-
# -------- Define how to compile. --------
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) -lcpri $(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) -lcpri $(LIB_FLAGS)
! endef
!
! LINK_ALL_OBJ_TO_EXE_NOLIB_DEPS =
! define LINK_ALL_OBJ_TO_EXE_NOLIB
! gcc $(LFLAGS) -o $@ $^
! endef
endif # ifdef STATICLINK
-
# -------- Rules for installing and removing the library files. --------
--- 153,185 ----
# myprogram: path/myprogram$(EXE_SUFFIX)
# -------- Define how to compile. --------
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) -lcpri $(LIB_FLAGS)
+ endef
endif # ifdef STATICLINK
# -------- Rules for installing and removing the library files. --------
***************
*** 265,274 ****
@echo The $(DESCRIPTION) UNIX library has been installed.
! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libcpri.a $(SYSTEM_LIB_DIR)/libcprid.a \
$(SYSTEM_INCLUDE_DIR)/cpri.h
- # $(WINDIR_U)/cpri$(LIB_VERSION).dll $(WINDIR_U)/cpri$(LIB_VERSION).dll
uninstall:
-rm -fv $(UNINSTALL_FILES)
@echo All gone!
--- 209,219 ----
@echo The $(DESCRIPTION) UNIX library has been installed.
! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libcpri_s.a $(SYSTEM_LIB_DIR)/libcprid_s.a \
! $(SYSTEM_LIB_DIR)/libcpri.so $(SYSTEM_LIB_DIR)/libcprid.so \
$(SYSTEM_INCLUDE_DIR)/cpri.h
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cpri
@echo All gone!
Index: makefile.vc
===================================================================
RCS file: /cvsroot/cpri/cpri/misc/makefile.vc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** makefile.vc 1 Feb 2004 17:09:16 -0000 1.9
--- makefile.vc 8 Feb 2004 11:35:56 -0000 1.10
***************
*** 17,22 ****
# The "depend" target uses sed.
-
-
# -------- define some variables that the primary makefile will use --------
--- 17,20 ----
***************
*** 48,63 ****
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s
! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX)
else
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)
! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX)
! EXPDEF_NAME = $(LIB_DIR)/cpri.def
endif
--- 46,61 ----
ifdef STATICLINK
! # link as a static library
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s
! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX)
else
! # link as a DLL
! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)
! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)
! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll
! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME)
! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX)
! EXPDEF_NAME = $(LIB_DIR)/cpri.def
endif
***************
*** 70,88 ****
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
--- 68,86 ----
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
***************
*** 96,109 ****
ifdef MSVCDIR
! MSVCDIR_U = $(subst \,/,$(MSVCDIR))
! MSVCDIR_D = $(subst /,\,$(MSVCDIR))
! else
! ifdef MSDEVDIR
! MSVCDIR_U = $(subst \,/,$(MSDEVDIR))
! MSVCDIR_D = $(subst /,\,$(MSDEVDIR))
else
badmsvc:
@echo Your MSVCDIR or MSDEVDIR environment variable is not set!
! endif
endif
--- 94,107 ----
ifdef MSVCDIR
! MSVCDIR_U = $(subst \,/,$(MSVCDIR))
! MSVCDIR_D = $(subst /,\,$(MSVCDIR))
else
+ ifdef MSDEVDIR
+ MSVCDIR_U = $(subst \,/,$(MSDEVDIR))
+ MSVCDIR_D = $(subst /,\,$(MSDEVDIR))
+ else
badmsvc:
@echo Your MSVCDIR or MSDEVDIR environment variable is not set!
! endif
endif
***************
*** 123,127 ****
SYSTEM_LIB_DIR_D = $(MSVCDIR_D)\lib
-
ifdef UNIX_TOOLS
# -------- Set up mktext --------
--- 121,124 ----
***************
*** 153,183 ****
endif
-
- # -------- Find Allegro, runner and makedoc. --------
-
- ifndef NEED_ALLEGRO
- ifeq ($(wildcard docs/makedoc.c),)
- NEED_ALLEGRO = 1
- else
- ifeq ($(wildcard src/misc/runner.c),)
- NEED_ALLEGRO = 1
- endif
- endif
- endif
-
.PHONY: badalleg
- ifdef NEED_ALLEGRO
- ifdef ALLEGRO
- ALLEGRODIR_U = $(subst \,/,$(ALLEGRO))
- else
- badalleg:
- @echo Couldnt find Allegro!
- @echo Is your ALLEGRO environment variable set correctly? It should
- @echo point to the place where Allegro lives, e.g.
- @echo "set ALLEGRO=c:\msvc\allegro".
- endif
- endif
-
RUNNER = $(CGUIDIR)/obj/msvc/runner$(EXE_SUFFIX)
--- 150,155 ----
***************
*** 188,193 ****
_default: default
-
-
# -------- decide what compiler options to use --------
--- 160,163 ----
***************
*** 199,233 ****
ifdef DEBUGMODE
! # -------- debugging build --------
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Gd -Zi -MDd
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) -Wall
! LFLAGS = -debug -debugtype:cv
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cguid_s.lib alld_s.lib
! else
! LIB_FLAGS = cguid.lib alld.lib
! endif
! else
! ifdef PROFILEMODE
! # -------- profiling build --------
! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
! SFLAGS = -Wall
! LFLAGS = -profile
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib allp_s.lib
! else
! LIB_FLAGS = cgui.lib allp.lib
! endif
! else
! # -------- optimised build --------
! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
! SFLAGS = -Wall
! LFLAGS = -release
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib alleg_s.lib
else
! LIB_FLAGS = cgui.lib alleg.lib
! endif
! endif
endif
--- 169,203 ----
ifdef DEBUGMODE
! # -------- debugging build --------
! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Gd -Zi -MDd
! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) -Wall
! LFLAGS = -debug -debugtype:cv
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cguid_s.lib alld_s.lib
! else
! LIB_FLAGS = cguid.lib alld.lib
! endif
else
! ifdef PROFILEMODE
! # -------- profiling build --------
! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
! SFLAGS = -Wall
! LFLAGS = -profile
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib allp_s.lib
! else
! LIB_FLAGS = cgui.lib allp.lib
! endif
! else
! # -------- optimised build --------
! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
! SFLAGS = -Wall
! LFLAGS = -release
! ifdef STATICLINK_ALLEGRO
! LIB_FLAGS = cgui_s.lib alleg_s.lib
! else
! LIB_FLAGS = cgui.lib alleg.lib
! endif
! endif
endif
***************
*** 245,249 ****
ifdef STATICLINK
! COMPILE_FLAGS += -DCPRI_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
--- 215,219 ----
ifdef STATICLINK
! COMPILE_FLAGS += -DCPRI_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK
endif
***************
*** 251,256 ****
dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib
-
-
# -------- List platform specific objects and programs. --------
--- 221,224 ----
***************
*** 264,336 ****
# 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:windows -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. --------
--- 232,259 ----
# 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. --------
***************
*** 372,376 ****
endif
-
INSTALL_HEADERS = $(addprefix $(MSVCDIR_U)/,$(wildcard include/cpri/*.h))
--- 295,298 ----
***************
*** 395,407 ****
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. --------
--- 317,323 ----
uninstall:
-rm -fv $(UNINSTALL_FILES)
+ -rm -frv $(SYSTEM_INCLUDE_DIR)/cpri
@echo All gone!
# -------- Generate automatic dependencies. --------
Index: zipup.sh
===================================================================
RCS file: /cvsroot/cpri/cpri/misc/zipup.sh,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** zipup.sh 14 Dec 2003 16:42:40 -0000 1.6
--- zipup.sh 8 Feb 2004 11:35:56 -0000 1.7
***************
*** 59,67 ****
fix* misc/*.sh \
obj/*/*/*.dep lib/*/*.def \
! readme.txt \
resource/cprilabl resource/icons.dat \
docs/*._tx \
src/*.c src/*.h src/*.inc src/*.t src/*.ht \
examples/*.c examples/*.cfg \
include/*.h include/cpri/*.h"
--- 59,68 ----
fix* misc/*.sh \
obj/*/*/*.dep lib/*/*.def \
! docs/readme.txt docs/readme.html docs/cpri.html docs/cpri.txt \
resource/cprilabl resource/icons.dat \
docs/*._tx \
src/*.c src/*.h src/*.inc src/*.t src/*.ht \
examples/*.c examples/*.cfg \
+ resource/* \
include/*.h include/cpri/*.h"
--- makefile.doc DELETED ---
|