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/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.