Changeset 2965 for trunk/kLdr/testcase


Ignore:
Timestamp:
Feb 13, 2007, 10:04:40 PM (19 years ago)
Author:
bird
Message:

messing about...

Location:
trunk/kLdr/testcase
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/kLdr/testcase/Makefile.kmk

    r2960 r2965  
    6060
    6161else
     62 TEMPLATE_TST_CFLAGS = -Wall -pedantic -g
     63 TEMPLATE_TST_CFLAGS.release = -O2
     64 TEMPLATE_TST_LDFLAGS =
    6265 ifneq ($(filter os2,$(BUILD_TARGET)),)
    6366  TEMPLATE_TST_TOOL = GCC3OMF
    6467  TEMPLATE_TST_ASFLAGS = -f obj
    6568  TEMPLATE_TST_LIBS = os2 gcc end
     69 else ifneq ($(filter darwin,$(BUILD_TARGET)),)
     70  TEMPLATE_TST_TOOL = GCC4MACHO
     71  TEMPLATE_TST_ASFLAGS = -f macho
     72  TEMPLATE_TST_DEFS = __DARWIN__
     73  TEMPLATE_TST_LIBS =
    6674 else
    6775  TEMPLATE_TST_TOOL = GCC3
     
    6977  TEMPLATE_TST_LIBS = gcc
    7078 endif
    71  TEMPLATE_TST_CFLAGS = -Wall -pedantic -g
    72  TEMPLATE_TST_CFLAGS.release = -O2
    73  TEMPLATE_TST_LDFLAGS =
    7479endif
    7580TEMPLATE_TST_INCS = . ..
     
    101106
    102107else
    103  ifneq ($(filter os2,$(BUILD_TARGET)),)
     108 TEMPLATE_TSTBARE_CFLAGS = -Wall -pedantic -g
     109 TEMPLATE_TSTBARE_CFLAGS.release = -O2
     110 TEMPLATE_TSTBARE_LDFLAGS = -nostdlib -lgcc
     111 ifeq ($(filter-out os2,$(BUILD_TARGET)),)
    104112  TEMPLATE_TSTBARE_TOOL = GCC3OMF
    105113  TEMPLATE_TSTBARE_ASFLAGS = -f obj
     
    107115  TEMPLATE_TSTBARE_DEFS = main=main_wrapped
    108116  TEMPLATE_TSTBARE_LIBS = os2
     117 else ifeq ($(filter-out darwin,$(BUILD_TARGET)),)
     118  TEMPLATE_TSTBARE_TOOL = GCC4MACHO
     119  TEMPLATE_TSTBARE_ASFLAGS = -f macho
     120  TEMPLATE_TSTBARE_ASTOOL = NASM
     121  TEMPLATE_TSTBARE_DEFS = __DARWIN__
     122  TEMPLATE_TSTBARE_LIBS =
     123  TEMPLATE_TSTBARE_CFLAGS += -static
     124  TEMPLATE_TSTBARE_LDFLAGS += -nostdlib -r
    109125 else
    110126  TEMPLATE_TSTBARE_TOOL = GCC3
     
    112128  TEMPLATE_TSTBARE_LIBS = gcc
    113129 endif
    114  TEMPLATE_TSTBARE_CFLAGS = -Wall -pedantic -g
    115  TEMPLATE_TSTBARE_CFLAGS.release = -O2
    116  TEMPLATE_TSTBARE_LDFLAGS = -nostdlib -lgcc
    117130endif
    118131TEMPLATE_TSTBARE_INCS = . ..
     
    129142TEMPLATE_TSTBAREDLL = Bare bone testcase dll template
    130143TEMPLATE_TSTBAREDLL_EXTENDS = TSTBARE
    131 ifneq ($(filter win nt win32 win64,$(BUILD_TARGET)),)
    132 TEMPLATE_TSTBAREDLL_LDFLAGS += -Entry:DllMain
    133 else
     144ifeq ($(BUILD_TARGET),win)
     145 TEMPLATE_TSTBAREDLL_LDFLAGS += -Entry:DllMain
     146else ifeq ($(BUILD_TARGET),darwin)
     147# TEMPLATE_TSTBAREDLL_CFLAGS += -dynamiclib
     148# TEMPLATE_TSTBAREDLL_LDFLAGS += -dynamiclib
    134149endif
    135150
     
    168183tst-0_SOURCES.os2= tstExeMainStub-os2.asm
    169184
    170 ifeq ($(filter-out nt win win32 win64,$(BUILD_TARGET)),)
     185ifeq ($(BUILD_TARGET),win)
    171186tst-0-driver_LIBS= $(PATH_LIB)/kLdr.lib
    172187tst-0-a_LIBS     = $(PATH_TARGET)/tst-0-d/tst-0-d.lib
     
    175190tst-0_LIBS       = $(TARGET_tst-0-a:.dll=.lib) $(TARGET_tst-0-b:.dll=.lib) $(TARGET_tst-0-c:.dll=.lib)
    176191else
    177 tst-0-driver_LIBS.os2 = $(PATH_DLL)/kLdr.dll
     192tst-0-driver_LIBS= $(PATH_DLL)/kLdr$(SUFF_DLL)
    178193tst-0-a_LIBS     = $(subst -a,-d,$(TARGET_tst-0-a))
    179194tst-0-b_LIBS     = $(subst -b,-d,$(TARGET_tst-0-b))
     
    204219tst-1_SOURCES    = tst-1.c
    205220
    206 ifeq ($(filter-out nt win win32 win64,$(BUILD_TARGET)),)
     221ifeq ($(BUILD_TARGET),win)
    207222tst-1-a_LIBS     = $(PATH_TARGET)/tst-1-d/tst-1-d.lib
    208223tst-1-b_LIBS     = $(PATH_TARGET)/tst-1-d/tst-1-d.lib
     
    238253tst-2_SOURCES    = tst-2.c
    239254
    240 ifeq ($(filter-out nt win win32 win64,$(BUILD_TARGET)),)
     255ifeq ($(BUILD_TARGET),win)
    241256tst-2-b_LIBS     = $(PATH_TARGET)/tst-2-a/tst-2-a.lib
    242257tst-2-c_LIBS     = $(PATH_TARGET)/tst-2-a/tst-2-a.lib
     
    251266
    252267
     268#
     269# tst-3: Single module.
     270#
     271PROGRAMS += tst-3-driver
     272DLLS += tst-3
     273
     274tst-3_TEMPLATE = TSTBAREDLL
     275tst-3_SOURCES  = tst-3.c tstDllMainStub.c
     276tst-3_SOURCES.os2= tstDllMainStub-os2.asm
     277
     278tst-3-driver_TEMPLATE = TSTPROG
     279tst-3-driver_SOURCES  = tst-3-driver.c
     280
     281ifeq ($(BUILD_TARGET),win)
     282tst-3-driver_LIBS = $(PATH_LIB)/kLdr.lib
     283else
     284tst-3-driver_LIBS = $(PATH_DLL)/kLdr$(SUFF_DLL)
     285endif
     286
    253287
    254288# generate rules.
  • trunk/kLdr/testcase/tst-0-driver.c

    r2878 r2965  
    6161    g_cErrors++;
    6262
    63     printf("tstLdrMod: ");
     63    printf("tst-0-driver: ");
    6464    va_start(va, pszFormat);
    6565    vprintf(pszFormat, va);
  • trunk/kLdr/testcase/tst.h

    r2885 r2965  
    4242#endif
    4343
    44 #if defined(__OS2__)
     44#if defined(__OS2__) || defined(__DARWIN__)
    4545# define MY_NAME(a) "_" a
    4646#else
  • trunk/kLdr/testcase/tstDllMain.c

    r2885 r2965  
    4040# include <string.h>
    4141
     42#elif defined(__DARWIN__)
     43# include <unistd.h>
     44# include <string.h>
     45
    4246#else
    4347# error "port me"
    4448#endif
    4549
     50
    4651/*******************************************************************************
    4752*   Internal Functions                                                         *
    4853*******************************************************************************/
    49 static void tstWrite(const char *psz);
     54void tstWrite(const char *psz);
    5055
    5156
     
    120125}
    121126
     127#elif defined(__DARWIN__)
     128/* later */
     129
    122130#else
    123131# error "port me"
     
    130138 * @param   pszMsg  The string.
    131139 */
    132 static void tstWrite(const char *pszMsg)
     140void tstWrite(const char *pszMsg)
    133141{
    134142#if defined(__OS2__) || defined(__WIN__)
     
    171179    }
    172180
     181#elif defined(__DARWIN__)
     182    write(STDERR_FILENO, pszMsg, strlen(pszMsg));
     183
    173184#else
    174185# error "port me"
  • trunk/kLdr/testcase/tstDllMainStub.c

    r2878 r2965  
    3838# include <windows.h>
    3939
     40#elif defined(__DARWIN__)
     41/* later */
     42
    4043#else
    4144# error "port me"
     
    6265}
    6366
     67#elif defined(__DARWIN__)
     68/* later */
     69
    6470#else
    6571# error "port me"
Note: See TracChangeset for help on using the changeset viewer.