Ignore:
Timestamp:
May 13, 2000, 5:40:34 PM (25 years ago)
Author:
bird
Message:

Updated makefiles to be more comform with the new makefile style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/common/makefile.gcc

    r2714 r3532  
    1 # $Id: makefile.gcc,v 1.3 2000-02-09 23:50:51 bird Exp $
     1# $Id: makefile.gcc,v 1.4 2000-05-13 15:40:34 bird Exp $
    22
    33#
     
    88#
    99
    10 # common include directory
     10#
     11# Directories and common tools.
     12#
     13PDWIN32_TOOLS   = ..\bin
    1114PDWIN32_INCLUDE = ..\..\include
     15!include $(PDWIN32_INCLUDE)\pdwin32.tools
    1216
    13 !ifndef RM
    14 RM = rm -f
    15 !endif
     17# Definitions for pdwin32.post
     18LOCALCLEAN  = 1
     19CLEANEXTRAS = commongcc.*
     20
     21
     22#
     23# If OMF flag isn't set, set it to default value.
     24#
    1625!ifndef OMF
    1726OMF=0
    1827!endif
     28
    1929
    2030#
     
    2434CXX = gcc
    2535LD  = gcc
     36!ifdef DEBUG
     37OBJDIR  = .\bin\debug
     38!else
     39OBJDIR  = .\bin\release
     40!endif
     41
    2642
    2743!if $(OMF) == 0
     44# aout version
    2845O        = o
    2946LIB      = a
     
    3249
    3350!else
    34 
     51# OMF version
    3552O        = gobj
    3653LIB      = lib
    3754AR       = emxomfar
    3855CFZOMF   = -Zomf
     56
    3957!endif
     58
    4059
    4160CDEFINES  = -D__WIN32OS2__ -D__WINE__
    4261CINCLUDES = -I$(PDWIN32_INCLUDE)\Win -I$(PDWIN32_INCLUDE)
     62CPLUS_INCLUDE_PATH= $(CPLUS_INCLUDE_PATH);$(INCLUDE)
    4363
    44 #Note: Add -fhandle-exceptions if old gcc version (< 2.8.x?).
     64# Note: Add -fhandle-exceptions if old gcc version (< 2.8.x?).
    4565!ifndef DEBUG
    4666CFLAGS    = $(CFZOMF) -Wall -Zmap -Zmt -mprobe -Wall -s -O
     
    5272
    5373#
    54 # interference rules
     74# Interference rules
    5575#
    56 .c.$(O):
     76.c{$(OBJDIR)}.$(O):
    5777    $(CC) -c $(CFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
    5878
    59 .cpp.$(O):
     79.cpp{$(OBJDIR)}.$(O):
    6080    $(CXX) -c $(CXXFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
    6181
    6282
    63 
    64 all: commongcc.$(LIB)
     83#
     84# Object files.
     85#
     86OBJS = \
     87$(OBJDIR)\kFilePe.$(O) \
     88$(OBJDIR)\kFileDef.$(O) \
     89$(OBJDIR)\kFileLx.$(O) \
     90$(OBJDIR)\kFileFormatBase.$(O)
    6591
    6692
    67 commongcc.$(LIB): kFilePE.$(O) kFileDef.$(O)
    68    $(RM) $@
    69    $(AR) cr $@ kFilePE.$(O) kFileDef.$(O)
     93#
     94# All rule.
     95#
     96all:    $(OBJDIR) \
     97        commongcc.$(LIB)
    7098
    7199
    72 dep:
    73     @nmake /nologo -f makefile NODEP=1 dep
     100$(OBJDIR)\commongcc.$(LIB): $(OBJS)
     101   $(RM) $@
     102   $(AR) cr $@ $(OBJS)
    74103
    75 !ifndef NODEP
    76 !include .depend
    77 !endif
     104commongcc.$(LIB): $(OBJDIR)\commongcc.$(LIB)
     105   $(CP) $** $@
    78106
    79107
    80 clean:
    81    @$(RM) *.$(O) commongcc.$(LIB)
     108#
     109# dependent rule. forward to main makefile.
     110#
     111dep:
     112    @$(MAKE) /nologo -f makefile NODEP=1 dep
    82113
     114
     115# Includes the common rules.
     116!include $(PDWIN32_INCLUDE)/pdwin32.post
     117
Note: See TracChangeset for help on using the changeset viewer.