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

New makefile style.

File:
1 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 
Note: See TracChangeset for help on using the changeset viewer.