Changeset 13141 in project for chicken


Ignore:
Timestamp:
02/01/09 00:02:07 (11 years ago)
Author:
felix winkelmann
Message:

attempt to fix msvc build (incomplete)§

Location:
chicken/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/Makefile.mingw

    r13131 r13141  
    3636WINDOWS = 1
    3737WINDOWS_SHELL = 1
     38UNAME_SYS = MinGW
    3839
    3940# file extensions
  • chicken/trunk/Makefile.msvc

    r12932 r13141  
    4444WINDOWS = 1
    4545WINDOWS_SHELL = 1
     46UNAME_SYS = win32
    4647
    4748# file extensions
     
    7576ifdef DEBUGBUILD
    7677C_COMPILER_OPTIONS = -nologo -DHAVE_CHICKEN_CONFIG_H
    77 C_COMPILER_OPTIMIZATION_OPTIONS = -Zi
     78#C_COMPILER_OPTIMIZATION_OPTIONS = -Zi
    7879C_COMPILER_SHARED_OPTIONS = -MDd -DPIC
    7980LINKER_OPTIONS += -debug
     
    8586C_COMPILER_OUTPUT_OPTION = -Fo
    8687C_COMPILER_OUTPUT = $(C_COMPILER_OUTPUT_OPTION)$@
    87 
    8888C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS = $(C_COMPILER_BUILD_RUNTIME_OPTIONS) -DC_UNSAFE_RUNTIME
    8989
     
    173173POSIXFILE = posixwin
    174174
    175 # default settings (the default chicken-defaults.h seems to be fine)
     175CUSTOM_CHICKEN_DEFAULTS=1
     176
     177# default settings
    176178
    177179include defaults.make
     
    185187
    186188chicken-config.h: chicken-defaults.h
    187         echo "#define HAVE_DIRENT_H 0" >>$@
    188         echo "#define HAVE_INTTYPES_H 0" >>$@
    189         echo "#define HAVE_LIMITS_H 1" >>$@
    190         echo "#define HAVE_LONG_LONG 1" >>$@
    191         echo "#define HAVE_MEMMOVE 1" >>$@
    192         echo "#define HAVE_MEMORY_H 1" >>$@
    193         echo "#define HAVE_STDINT_H 0" >>$@
    194         echo "#define HAVE_STDLIB_H 1" >>$@
    195         echo "#define HAVE_STRERROR 1" >>$@
    196         echo "#define HAVE_STRINGS_H 0" >>$@
    197         echo "#define HAVE_STRING_H 1" >>$@
    198         echo "#define HAVE_STRTOLL 0" >>$@
    199         echo "#define HAVE_SYS_STAT_H 1" >>$@
    200         echo "#define HAVE_SYS_TYPES_H 1" >>$@
    201         echo "#define HAVE_UNISTD_H 0" >>$@
    202         echo "#define HAVE_UNSIGNED_LONG_LONG 0" >>$@
    203         echo "#define HAVE_WINDOWS_H 1" >>$@
    204         echo "#define HAVE__STRTOI64 1" >>$@
    205         echo "#define STDC_HEADERS 1" >>$@
    206         echo "#define HAVE_ALLOCA_H 0" >>$@
    207         echo "#define HAVE_DIRECT_H 1" >>$@
    208         echo "#define HAVE_ERRNO_H 1" >>$@
    209         echo "#define HAVE_GCVT 1" >>$@
    210         echo "#define HAVE_LOADLIBRARY 1" >>$@
    211         echo "#define HAVE_GETPROCADDRESS 1" >>$@
    212         echo "#define HAVE_WINSOCK2_H 1" >>$@
    213         echo "#define HAVE_WS2TCPIP_H 1" >>$@
    214         echo "#define C_STACK_GROWS_DOWNWARD 1" >>$@
     189        echo #define HAVE_DIRENT_H 0 >>$@
     190        echo #define HAVE_INTTYPES_H 0 >>$@
     191        echo #define HAVE_LIMITS_H 1 >>$@
     192        echo #define HAVE_LONG_LONG 1 >>$@
     193        echo #define HAVE_MEMMOVE 1 >>$@
     194        echo #define HAVE_MEMORY_H 1 >>$@
     195        echo #define HAVE_STDINT_H 0 >>$@
     196        echo #define HAVE_STDLIB_H 1 >>$@
     197        echo #define HAVE_STRERROR 1 >>$@
     198        echo #define HAVE_STRINGS_H 0 >>$@
     199        echo #define HAVE_STRING_H 1 >>$@
     200        echo #define HAVE_STRTOLL 0 >>$@
     201        echo #define HAVE_SYS_STAT_H 1 >>$@
     202        echo #define HAVE_SYS_TYPES_H 1 >>$@
     203        echo #define HAVE_UNISTD_H 0 >>$@
     204        echo #define HAVE_UNSIGNED_LONG_LONG 0 >>$@
     205        echo #define HAVE_WINDOWS_H 1 >>$@
     206        echo #define HAVE__STRTOI64 1 >>$@
     207        echo #define STDC_HEADERS 1 >>$@
     208        echo #define HAVE_ALLOCA_H 0 >>$@
     209        echo #define HAVE_DIRECT_H 1 >>$@
     210        echo #define HAVE_ERRNO_H 1 >>$@
     211        echo #define HAVE_GCVT 1 >>$@
     212        echo #define HAVE_LOADLIBRARY 1 >>$@
     213        echo #define HAVE_GETPROCADDRESS 1 >>$@
     214        echo #define HAVE_WINSOCK2_H 1 >>$@
     215        echo #define HAVE_WS2TCPIP_H 1 >>$@
     216        echo #define C_STACK_GROWS_DOWNWARD 1 >>$@
    215217ifdef GCHOOKS
    216         echo "#define C_GC_HOOKS" >>$@
     218        echo #define C_GC_HOOKS >>$@
    217219endif
    218220ifdef SYMBOLGC
    219         echo "#define C_COLLECT_ALL_SYMBOLS" >>$@
     221        echo #define C_COLLECT_ALL_SYMBOLS >>$@
    220222endif
    221223ifdef NOAPPLYHOOK
    222         echo "#define C_NO_APPLY_HOOK" >>$@
    223 endif
    224         echo "#define C_HACKED_APPLY" >>$@
     224        echo #define C_NO_APPLY_HOOK >>$@
     225endif
     226        echo #define C_HACKED_APPLY >>$@
    225227        cat chicken-defaults.h >>$@
    226228
    227 include rules.make
     229chicken-defaults.h:
     230        echo /* generated */ >$@
     231        echo #define C_BUILD_TAG "$(BUILD_TAG)" >>$@
     232        echo #define C_CHICKEN_PROGRAM "$(CHICKEN_PROGRAM)$(EXE)" >>$@
     233        echo #define C_WINDOWS_SHELL 1 >>$@
     234        echo #ifndef C_INSTALL_CC >>$@
     235        echo # define C_INSTALL_CC "$(C_COMPILER)" >>$@
     236        echo #endif >>$@
     237        echo #ifndef C_INSTALL_CXX >>$@
     238        echo # define C_INSTALL_CXX "$(CXX_COMPILER)" >>$@
     239        echo #endif >>$@
     240        echo #ifndef C_INSTALL_CFLAGS >>$@
     241        echo # define C_INSTALL_CFLAGS "$(C_COMPILER_OPTIONS) $(C_COMPILER_OPTIMIZATION_OPTIONS)" >>$@
     242        echo #endif >>$@
     243        echo #ifndef C_INSTALL_LDFLAGS >>$@
     244        echo # define C_INSTALL_LDFLAGS "$(LINKER_OPTIONS) $(LINKER_OPTIMIZATION_OPTIONS)" >>$@
     245        echo #endif >>$@
     246        echo #ifndef C_INSTALL_SHARE_HOME >>$@
     247        echo # define C_INSTALL_SHARE_HOME "$(DATADIR)" >>$@
     248        echo #endif >>$@
     249        echo #ifndef C_INSTALL_BIN_HOME >>$@
     250        echo # define C_INSTALL_BIN_HOME "$(BINDIR)" >>$@
     251        echo #endif >>$@
     252        echo #ifndef C_INSTALL_EGG_HOME >>$@
     253        echo # define C_INSTALL_EGG_HOME "$(EGGDIR)" >>$@
     254        echo #endif >>$@
     255        echo #ifndef C_INSTALL_LIB_HOME >>$@
     256        echo # define C_INSTALL_LIB_HOME "$(LIBDIR)" >>$@
     257        echo #endif >>$@
     258        echo #ifndef C_INSTALL_STATIC_LIB_HOME >>$@
     259        echo # define C_INSTALL_STATIC_LIB_HOME "$(LIBDIR)" >>$@
     260        echo #endif >>$@
     261        echo #ifndef C_INSTALL_INCLUDE_HOME >>$@
     262        echo # define C_INSTALL_INCLUDE_HOME "$(INCDIR)" >>$@
     263        echo #endif >>$@
     264        echo #ifndef C_INSTALL_MORE_LIBS >>$@
     265        echo # define C_INSTALL_MORE_LIBS "$(LIBRARIES)" >>$@
     266        echo #endif >>$@
     267        echo #ifndef C_INSTALL_MORE_STATIC_LIBS >>$@
     268        echo # define C_INSTALL_MORE_STATIC_LIBS "$(LIBRARIES)" >>$@
     269        echo #endif >>$@
     270        echo #ifndef C_DEFAULT_TARGET_STACK_SIZE >>$@
     271        echo # define C_DEFAULT_TARGET_STACK_SIZE $(NURSERY) >>$@
     272        echo #endif >>$@
     273        echo #ifndef C_DEFAULT_TARGET_HEAP_SIZE >>$@
     274        echo # define C_DEFAULT_TARGET_HEAP_SIZE 0 >>$@
     275        echo #endif >>$@
     276        echo #ifndef C_STACK_GROWS_DOWNWARD >>$@
     277        echo # define C_STACK_GROWS_DOWNWARD $(STACKDIRECTION) >>$@
     278        echo #endif >>$@
     279        echo #ifndef C_TARGET_MORE_LIBS >>$@
     280        echo # define C_TARGET_MORE_LIBS "$(TARGET_LIBRARIES)" >>$@
     281        echo #endif >>$@
     282        echo #ifndef C_TARGET_MORE_STATIC_LIBS >>$@
     283        echo # define C_TARGET_MORE_STATIC_LIBS "$(TARGET_LIBRARIES)" >>$@
     284        echo #endif >>$@
     285        echo #ifndef C_TARGET_CC >>$@
     286        echo # define C_TARGET_CC "$(TARGET_C_COMPILER)" >>$@
     287        echo #endif >>$@
     288        echo #ifndef C_TARGET_CXX >>$@
     289        echo # define C_TARGET_CXX "$(TARGET_CXX_COMPILER)" >>$@
     290        echo #endif >>$@
     291        echo #ifndef C_TARGET_CFLAGS >>$@
     292        echo # define C_TARGET_CFLAGS "$(TARGET_C_COMPILER_OPTIONS) $(TARGET_C_COMPILER_OPTIMIZATION_OPTIONS)" >>$@
     293        echo #endif >>$@
     294        echo #ifndef C_TARGET_LDFLAGS >>$@
     295        echo # define C_TARGET_LDFLAGS "$(TARGET_LINKER_OPTIONS) $(TARGET_LINKER_OPTIMIZATION_OPTIONS)" >>$@
     296        echo #endif >>$@
     297        echo #ifndef C_CROSS_CHICKEN >>$@
     298        echo # define C_CROSS_CHICKEN $(CROSS_CHICKEN) >>$@
     299        echo #endif >>$@
     300        echo #ifndef C_TARGET_BIN_HOME >>$@
     301        echo # define C_TARGET_BIN_HOME "$(TARGET_PREFIX)/bin" >>$@
     302        echo #endif >>$@
     303        echo #ifndef C_TARGET_LIB_HOME >>$@
     304        echo # define C_TARGET_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     305        echo #endif >>$@
     306        echo #ifndef C_TARGET_RUN_LIB_HOME >>$@
     307        echo # define C_TARGET_RUN_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     308        echo #endif >>$@
     309        echo #ifndef C_TARGET_SHARE_HOME >>$@
     310        echo # define C_TARGET_SHARE_HOME "$(TARGET_PREFIX)/share" >>$@
     311        echo #endif >>$@
     312        echo #ifndef C_TARGET_INCLUDE_HOME >>$@
     313        echo # define C_TARGET_INCLUDE_HOME "$(TARGET_PREFIX)/include" >>$@
     314        echo #endif >>$@
     315        echo #ifndef C_TARGET_STATIC_LIB_HOME >>$@
     316        echo # define C_TARGET_STATIC_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     317        echo #endif >>$@
     318        echo #ifndef C_CSC_PROGRAM" >>$@
     319        echo # define C_CSC_PROGRAM "$(CSC_PROGRAM)" >>$@
     320        echo #endif" >>$@
     321        echo #ifndef C_CSI_PROGRAM" >>$@
     322        echo # define C_CSI_PROGRAM "$(CSI_PROGRAM)" >>$@
     323        echo #endif" >>$@
     324        echo #ifndef C_CHICKEN_BUG_PROGRAM" >>$@
     325        echo # define C_CHICKEN_BUG_PROGRAM "$(CHICKEN_BUG_PROGRAM)" >>$@
     326        echo #endif" >>$@
     327        echo #ifndef C_BINARY_VERSION >>$@
     328        echo # define C_BINARY_VERSION $(BINARYVERSION) >>$@
     329        echo #endif >>$@
     330
     331include $(SRCDIR)rules.make
  • chicken/trunk/defaults.make

    r13131 r13141  
    158158
    159159ifdef DEBUGBUILD
     160ifeq ($(C_COMPILER),gcc)
    160161C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
     162endif
    161163endif
    162164C_COMPILER_BUILD_RUNTIME_OPTIONS ?= -DC_BUILDING_LIBCHICKEN
     
    243245
    244246HOSTNAME ?= $(shell hostname)
     247
    245248ifdef WINDOWS_SHELL
    246249BUILD_TIME ?= $(shell date /t)
    247 UNAME_SYS ?= MinGW
    248250COPY_COMMAND = copy /Y
    249251else
     
    339341# main rule
    340342
    341 .PHONY: all
    342 
    343 ifdef WINDOWS_SHELL
    344 all: $(TARGETS)
    345 else
     343.PHONY: all buildsvnrevision
     344
    346345all: buildsvnrevision $(TARGETS)
    347 endif
    348346
    349347buildsvnrevision:
     348ifndef WINDOWS_SHELL
    350349        sh $(SRCDIR)svnrevision.sh
     350endif
    351351
    352352# generic part of chicken-config.h
  • chicken/trunk/rules.make

    r13131 r13141  
    13101310        gzip -d -c $(SRCDIR)bootstrap.tar.gz | tar xvf -
    13111311        touch *.c
    1312         $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 DEBUGBUILD=1 \
     1312        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 DEBUGBUILD=1 PLATFORM=$(PLATFORM) \
    13131313          chicken$(EXE)
    13141314        $(COPY_COMMAND) chicken$(EXE) chicken-boot$(EXE)
    13151315        touch *.scm
    1316         $(MAKE) PLATFORM=$(PLATFORM) confclean
     1316        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) confclean
    13171317
    13181318$(SRCDIR)bootstrap.tar.gz: distfiles
Note: See TracChangeset for help on using the changeset viewer.