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/glide/sst1/makefile

    r3864 r4624  
    1 # $Id: makefile,v 1.7 2000-07-19 19:05:14 sandervl Exp $
     1# $Id: makefile,v 1.8 2000-11-19 08:58:11 bird Exp $
    22
    33#
     
    77#
    88
     9
     10#
    911# Directory macros.
     12#
    1013PDWIN32_INCLUDE = ..\..\..\..\include
    1114PDWIN32_LIB     = ..\..\..\..\lib
    12 PDWIN32_BIN     = ..\..\..\..\$(OBJDIR)
     15PDWIN32_BIN     = ..\..\..\..\$(OBJDIR)\Glide\Voodoo1
    1316PDWIN32_TOOLS   = ..\..\..\..\tools\bin
    1417
    1518
    16 # Have extra clean rule.
    17 CLEAN2 = 1
     19#
     20# Tell buildenvironment that we should not copy this into /bin.
     21#
     22NO_MAIN_BIN_COPY = 1
    1823
     24
     25#
    1926# Compiler, tools, and interference rules.
     27#
    2028!include $(PDWIN32_INCLUDE)/pdwin32.mk
    2129
    2230
    23 # Object files. All objects should be prefixed with $(OBJDIR)!
     31#
     32# Subdirectories to travers.
     33#
     34SUBDIRS = \
     35.\..\swlibs\pcilib \
     36.\init \
     37.\glide \
     38.\texus
     39
     40
     41#
     42# Object files. Prefix with OBJDIR and one space before the '\'.
     43#
    2444OBJS = \
    2545$(OBJDIR)\initterm.obj
    2646
    2747
     48#
     49# Libraries. One space before the '\'.
     50#
     51LIBS = \
     52..\swlibs\pcilib/$(OBJDIR)/pcilib.lib \
     53texus/$(OBJDIR)/texus.lib \
     54init/$(OBJDIR)/init.lib \
     55init/initvg/$(OBJDIR)/initvg.lib \
     56glide/$(OBJDIR)/glide.lib \
     57$(PDWIN32_LIB)/kernel32.lib \
     58$(PDWIN32_LIB)/$(ODINCRT).lib \
     59OS2386.LIB \
     60$(RTLLIB_O)
     61
     62
     63#
    2864# Target name - name of the dll without extention and path.
     65#
    2966TARGET = glide2x
    3067
    3168
    32 # All rule - build objs, target dll, copies dll to bin and makes libs.
    33 all:    $(OBJDIR) \
    34         libs \
    35         $(OBJDIR)\$(TARGET).dll \
    36         $(PDWIN32_BIN)\Glide\Voodoo1\$(TARGET).dll \
    37         lib
    38 
    39 
    40 # Lib rule - build importlibrary (and evt. other libs)
    41 lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    42 
    43 
    44 # Libs rule - Make (sub) libraries. (Not import libraries!)
    45 libs:
    46     cd ..\swlibs\pcilib
    47     $(MAKE_CMD) $@
    48     cd ..\..\sst1\init
    49     $(MAKE_CMD) $@
    50     cd ..\glide
    51     $(MAKE_CMD) $@
    52     cd ..\texus
    53     $(MAKE_CMD) $@
    54     cd ..
    55 
    56 
    57 $(TARGET).dll: $(OBJS) $(TARGET).def
    58     $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    59           $(PDWIN32_LIB)/kernel32.lib \
    60           $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    61 
    62 
    63 # Dll rule - builds the target dll.
    64 $(OBJDIR)\$(TARGET).dll: $(OBJS) libs $(TARGET).def $(OBJDIR)\$(TARGET).lrf
    65     $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
    66 
    67 
    68 # Linker file - creates the parameter file passed on to the linker.
    69 $(OBJDIR)\$(TARGET).lrf: makefile
    70     @echo Creating file <<$@
    71 /OUT:$(OBJDIR)\$(TARGET).dll
    72 /MAP:$(OBJDIR)\$(TARGET).map
    73 $(OBJS)
    74 ..\swlibs\pcilib\$(OBJDIR)\pcilib.lib
    75 texus\$(OBJDIR)\texus.lib
    76 init\$(OBJDIR)\init.lib
    77 glide\$(OBJDIR)\glide.lib
    78 $(PDWIN32_LIB)\kernel32.lib
    79 $(PDWIN32_LIB)/$(ODINCRT).lib
    80 OS2386.LIB
    81 $(RTLLIB_O)
    82 $(TARGET).def
    83 <<keep
    84 
    85 
    86 # Copy rule.
    87 $(PDWIN32_BIN)\Glide\Voodoo1\$(TARGET).dll: $(OBJDIR)\$(TARGET).dll
    88     -mkdir $(PDWIN32_BIN)\Glide > nul 2>&1
    89     -mkdir $(PDWIN32_BIN)\Glide\Voodoo1 > nul 2>&1
    90     $(CP) $** $@
    91     $(CP) $** ..\..\..\..\bin\Glide\Voodoo1\$(TARGET).dll
    92 
    93 
    94 # Dep rule - makes depenencies for C, C++ and Asm files.
    95 dep:
    96     $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
    97         *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    98     cd ..\swlibs\pcilib
    99     $(MAKE_CMD) $@
    100     cd ..\..\sst1\init
    101     $(MAKE_CMD) $@
    102     cd ..\glide
    103     $(MAKE_CMD) $@
    104     cd ..\texus
    105     $(MAKE_CMD) $@
    106     cd ..
    107 
    108 
     69#
    10970# Includes the common rules.
     71#
    11072!include $(PDWIN32_INCLUDE)/pdwin32.post
    11173
    112 
    113 # Extra clean rule
    114 clean2:
    115     cd ..\swlibs\pcilib
    116     $(MAKE_CMD) clean
    117     cd ..\..\sst1\init
    118     $(MAKE_CMD) clean
    119     cd ..\glide
    120     $(MAKE_CMD) clean
    121     cd ..\texus
    122     $(MAKE_CMD) clean
    123     cd ..
    124 
Note: See TracChangeset for help on using the changeset viewer.