Changeset 4624 for trunk/src/opengl/mesa


Ignore:
Timestamp:
Nov 19, 2000, 10:27:40 AM (25 years ago)
Author:
bird
Message:

New makefile style.

Location:
trunk/src/opengl/mesa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/3dfx/makefile

    r3864 r4624  
    1 # $Id: makefile,v 1.10 2000-07-19 19:05:16 sandervl Exp $
     1# $Id: makefile,v 1.11 2000-11-19 08:58:16 bird Exp $
    22#
    33# Odin32 API
    44#
    5 # Makefile for Mesa OpenGL
     5#       Mesa/3dxf Makefile - opengl.dll.
    66#
    77
     8
     9#
    810# Directory macros.
     11#
    912PDWIN32_INCLUDE = ..\..\..\..\include
    1013PDWIN32_LIB     = ..\..\..\..\lib
    11 PDWIN32_BIN     = ..\..\..\..\$(OBJDIR)
     14PDWIN32_BIN     = ..\..\..\..\$(OBJDIR)\Glide
    1215PDWIN32_TOOLS   = ..\..\..\..\tools\bin
    1316
    1417
     18#
     19# Tell buildenvironment that we should not copy this into /bin.
     20#
     21NO_MAIN_BIN_COPY = 1
     22
     23
     24#
    1525# Compiler, tools, and interference rules.
     26#
    1627!include $(PDWIN32_INCLUDE)/pdwin32.mk
    17 MESADEFS= -DNO_PARALLEL -DNO_STEREO -DGL_MESA_window_pos -DOS2_THREADS \
    18           -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM_NOT \
    19           -DFX -DFX_V2 -DFX_SILENT -DBUILD_GL32 -DFAST_MATH
    2028
    21 CFLAGS   = -I.. -I..\GL $(CFLAGS_WIN32APP) -I..\..\glut -I..\..\glide\cvg\glide -I..\..\glide\swlibs\fxmisc -I..\..\glide\cvg\incsrc $(MESADEFS) /Wcnd- /Tdp
    22 CXXFLAGS = -I.. -I..\GL $(CXXFLAGS_WIN32APP) -I..\..\glut -I..\..\glide\cvg\glide -I..\..\glide\swlibs\fxmisc -I..\..\glide\cvg\incsrc $(MESADEFS)
    2329
    24 ASFLAGS=$(ASFLAGS) -Fdo:$(OBJDIR)
     30#
     31# Overrides.
     32#
     33CINCLUDES   = -I.. -I..\GL $(CINCLUDES) -I..\..\glut -I..\..\glide\cvg\glide \
     34              -I..\..\glide\swlibs\fxmisc -I..\..\glide\cvg\incsrc
     35CDEFINES    = $(CDEFINES_WIN32APP) \
     36              -DNO_PARALLEL -DNO_STEREO -DGL_MESA_window_pos -DOS2_THREADS \
     37              -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM_NOT \
     38              -DFX -DFX_V2 -DFX_SILENT -DBUILD_GL32 -DFAST_MATH
     39
     40CFLAGS      = $(CFLAGS) /Wcnd- /Tdp
     41!ifdef WAT
     42!error "Compiler not supported yet!"
     43!endif
    2544
    2645
    2746#
    2847# Interference rule for sources in the parent directory.
     48#   This is BAD! Try make library in parent directory? Problem with different objects.
    2949#
    3050{..}.c{$(OBJDIR)}.obj:
    31     $(CC) $(CFLAGS) -c -Fo$(OBJDIR)\$(@B).obj $<
     51    $(CC) $(CFLAGS) $(CINCLUDES) $(CDEFINES) -c -Fo$(OBJDIR)\$(@B).obj $<
    3252
    3353{..}.asm{$(OBJDIR)}.obj:
     
    3555
    3656
    37 # Object files. All objects should be prefixed with $(OBJDIR)!
     57#
     58# Object files. Prefix with OBJDIR and one space before the '\'.
     59#
    3860OBJS = \
    3961$(OBJDIR)\fxapi.obj \
     
    133155$(OBJDIR)\common_x86.obj \
    134156$(OBJDIR)\mmx_blend.obj \
    135 $(OBJDIR)\vertex.obj
     157$(OBJDIR)\vertex.obj \
     158$(OBJDIR)\mem.obj
    136159
    137160
     161#
     162# Libraries. One space before the '\'.
     163#
     164LIBS = \
     165$(PDWIN32_LIB)/$(ODINCRT).lib \
     166$(PDWIN32_LIB)\kernel32.lib \
     167$(PDWIN32_LIB)\gdi32.lib \
     168$(PDWIN32_LIB)\user32.lib \
     169$(PDWIN32_LIB)\glide2x.lib \
     170$(RTLLIB_O) \
     171os2386.lib
     172
     173
     174#
    138175# Target name - name of the dll without extention and path.
     176#
    139177TARGET = opengl32
    140178
    141179
    142 # All rule - build objs, target dll, copies dll to bin and makes libs.
    143 all:    $(OBJDIR) \
    144         $(OBJDIR)\$(TARGET).dll \
    145         $(PDWIN32_BIN)\Glide\$(TARGET).dll \
    146         lib
     180#
     181# Includes the common rules.
     182#
     183!include $(PDWIN32_INCLUDE)/pdwin32.post
    147184
    148185
    149 # Lib rule - build importlibrary (and evt. other libs)
    150 lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
     186#
     187# Additional dep rule - adds dependencies for some additional headers.
     188#
     189mydep:
     190    $(DEPEND) -a $(CINCLUDES) \
     191        ..\*.c ..\*.asm ..\*.h ..\GL\*.h ..\..\glut\*.h ..\..\glide\cvg\glide\*.h \
     192        ..\..\glide\swlibs\fxmisc\*.h ..\..\glide\cvg\incsrc\*.h
    151193
    152 
    153 # Dll rule - builds the target dll.
    154 $(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
    155     -4 $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
    156 
    157 
    158 # Linker file - creates the parameter file passed on to the linker.
    159 $(OBJDIR)\$(TARGET).lrf: makefile
    160     @echo Creating file <<$@
    161 /OUT:$(OBJDIR)\$(TARGET).dll
    162 /MAP:$(OBJDIR)\$(TARGET).map
    163 $(OBJS)
    164 $(PDWIN32_LIB)/$(ODINCRT).lib
    165 $(PDWIN32_LIB)\KERNEL32.LIB
    166 $(PDWIN32_LIB)\GDI32.LIB
    167 $(PDWIN32_LIB)\USER32.LIB
    168 $(PDWIN32_LIB)\glide2x.lib
    169 $(RTLLIB_O)
    170 OS2386.LIB
    171 $(TARGET).def
    172 <<keep
    173 
    174 
    175 # Copy rule.
    176 $(PDWIN32_BIN)\Glide\$(TARGET).dll: $(OBJDIR)\$(TARGET).dll
    177     $(CP) $** $@
    178 
    179 
    180 # Dep rule - makes depenencies for C, C++ and Asm files.
    181 dep:
    182     $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win -I..\..\glut -I..\GL -I.. -I$(PDWIN32_INCLUDE)\glide \
    183         *.c *.cpp *.h *.asm *.inc ..\*.c $(PDWIN32_INCLUDE)\*.h
    184 
    185 
    186 # Includes the common rules.
    187 !include $(PDWIN32_INCLUDE)/pdwin32.post
    188 
  • trunk/src/opengl/mesa/makefile

    r3864 r4624  
    1 # $Id: makefile,v 1.8 2000-07-19 19:05:15 sandervl Exp $
     1# $Id: makefile,v 1.9 2000-11-19 08:58:15 bird Exp $
    22
    33#
    44# Odin32 API
    55#
    6 # Makefile for Mesa OpenGL
     6#       Mesa Makefile - opengl.dll
    77#
    88
     9
     10#
    911# Directory macros.
     12#
    1013PDWIN32_INCLUDE = ..\..\..\include
    1114PDWIN32_LIB     = ..\..\..\lib
     
    1417
    1518
     19#
    1620# Compiler, tools, and interference rules.
     21#
    1722!include $(PDWIN32_INCLUDE)/pdwin32.mk
    1823
    19 # Flag overloads and local macros.
    20 CLEANEXTRAS = lz32rsrc.asm
     24
     25#
     26# Overrides. We have to compile this as a WIN32APP.
     27#
     28CINCLUDES   = -I. -IGL $(CINCLUDES) -I..\glut
     29CDEFINES    = $(CDEFINES_WIN32APP) \
     30              -DNO_PARALLEL -DNO_STEREO -DGL_MESA_window_pos -DOS2_THREADS \
     31              -DDIVE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM_NOT \
     32              -DFAST_MATH
     33CFLAGS      = $(CFLAGS_WIN32APP) /Wcnd- -Tdp
     34CXXFLAGS    = $(CFLAGS_WIN32APP) /Wcnd- -Tdp
     35!ifdef WAT
     36!error "Compiler not supported yet!"
     37!endif
    2138
    2239
    23 MESADEFS = -DNO_PARALLEL -DNO_STEREO -DGL_MESA_window_pos -DOS2_THREADS \
    24            -DDIVE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM_NOT \
    25            -DFAST_MATH -Tdp
    26 CFLAGS   = -I. -IGL $(CFLAGS_WIN32APP)   -I..\glut $(MESADEFS) /Wcnd-
    27 CXXFLAGS = -I. -IGL $(CXXFLAGS_WIN32APP) -I..\glut $(MESADEFS) /Wcnd-
    28 
    29 
    30 # Object files. All objects should be prefixed with $(OBJDIR)!
     40#
     41# Object files. Prefix with OBJDIR and one space before the '\'.
     42#
    3143OBJS = \
    3244$(OBJDIR)\wgl.obj \
     
    118130
    119131
     132#
     133# Libraries. One space before the '\'.
     134#
     135LIBS = \
     136$(PDWIN32_LIB)/$(ODINCRT).lib \
     137$(PDWIN32_LIB)\kernel32.lib \
     138$(PDWIN32_LIB)\gdi32.lib \
     139$(PDWIN32_LIB)\user32.lib \
     140$(RTLLIB_O) \
     141os2386.lib \
     142mmpm2.lib
     143
     144
     145#
    120146# Target name - name of the dll without extention and path.
     147#
    121148TARGET = opengl32
    122149
    123150
    124 # All rule - build objs, target dll, copies dll to bin and makes libs.
    125 all:    $(OBJDIR) \
    126         $(OBJDIR)\$(TARGET).dll \
    127         $(PDWIN32_BIN)\$(TARGET).dll \
    128         lib
     151#
     152# Includes the common rules.
     153#
     154!include $(PDWIN32_INCLUDE)/pdwin32.post
    129155
    130156
    131 # Lib rule - build importlibrary (and evt. other libs)
    132 lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
     157#
     158# Libs rule to support objectlibrary used by 3dxf.
     159#
     160libs: $(OBJDIR)\$(TARGET).lib
    133161
    134162
    135 # Dll rule - builds the target dll.
    136 $(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
    137     -4 $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
     163#
     164# Internal objectlibrary rule.
     165#
     166$(OBJDIR)\$(TARGET).lib: $(OBJS)
     167!if "$(VAC3)" == "1" | "$(VAC36)" == "1"
     168    $(RM) $(OBJDIR)\$(TARGET)
     169    $(ILIB) $(ILIBFLAGS) $@ @<<
     170$(OBJS:  = &^
     171)
     172$(OBJDIR)\$(@B).lst
     173<<
     174!else
     175!   error "Compiler is not yet supported."
     176!endif
    138177
    139178
    140 # Linker file - creates the parameter file passed on to the linker.
    141 $(OBJDIR)\$(TARGET).lrf: makefile
    142     @echo Creating file <<$@
    143 /OUT:$(OBJDIR)\$(TARGET).dll
    144 /MAP:$(OBJDIR)\$(TARGET).map
    145 $(OBJS)
    146 $(PDWIN32_LIB)/$(ODINCRT).lib
    147 $(PDWIN32_LIB)\KERNEL32.LIB
    148 $(PDWIN32_LIB)\GDI32.LIB
    149 $(PDWIN32_LIB)\USER32.LIB
    150 $(RTLLIB_O)
    151 OS2386.LIB
    152 MMPM2.LIB
    153 $(TARGET).def
    154 <<keep
     179#
     180# Additional dep rule - adds dependencies for some additional headers.
     181#
     182mydep:
     183    $(DEPEND) -a $(CINCLUDES) \
     184        .\gl\*.h ..\glut\*.h
    155185
    156 
    157 
    158 # Dep rule - makes depenencies for C, C++ and Asm files.
    159 dep:
    160     $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win -IGL \
    161         *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    162 
    163 
    164 # Includes the common rules.
    165 !include $(PDWIN32_INCLUDE)/pdwin32.post
    166 
Note: See TracChangeset for help on using the changeset viewer.