Changeset 236 for trunk/src/emx/Makefile


Ignore:
Timestamp:
May 26, 2003, 4:43:12 PM (22 years ago)
Author:
zap
Message:

See ChangeLog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/Makefile

    • Property cvs2svn:cvs-rev changed from 1.15 to 1.16
    r235 r236  
    4747
    4848# The C compiler
    49 CC = gcc -c
     49CC = gcc -c -Zmt
    5050# The C compiler flags
    5151CFLAGS.INC = -Iinclude -Isrc/include
    52 CFLAGS = -Wall -mstack-arg-probe -Zmt $(CFLAGS.INC) $(CFLAGS.$(MODE)) $(CFLAGS.KIND)
     52CFLAGS = -Wall -mstack-arg-probe $(CFLAGS.INC) $(CFLAGS.$(MODE)) $(CFLAGS.KIND)
    5353# The additional C compiler flags for different build modes
    5454CFLAGS.opt = -s -O3
    55 CFLAGS.dbg = -g
     55CFLAGS.dbg = -g -DDEBUG
    5656CFLAGS.aout =
    5757CFLAGS.omf = -Zomf
     
    6565
    6666# The linker
    67 LD = gcc
     67LD = gcc -Zmt
    6868# Linker flags
    69 LDFLAGS = -Zmt $(LDFLAGS.$(MODE)) $(LDFLAGS.KIND)
     69LDFLAGS = $(LDFLAGS.$(MODE)) $(LDFLAGS.KIND)
    7070LDFLAGS.DLL = $(LDFLAGS) -Zdll
    7171# Linker flags for different build modes
     
    126126MAKEDEPFLAGS = $(CFLAGS.INC)
    127127DO.DEPS = $(MAKEDEP) $(MAKEDEPFLAGS) \
    128   -I$(subst $(SPACE), -I,$(sort $(dir $^))) -p$(@D)/ -c -S -f$@ $^
     128  -I$(subst $(SPACE), -I,$(sort $(dir $^))) -I$. -p$(@D)/ -c -S -f$@ $^
    129129
    130130# How to convert an a.out file to the OMF format
     
    166166# Miscelaneous tools
    167167MKDIR = mkdir.exe -p $1
     168# How to update a file only if it has been changed
     169UPDATE = (cmp -s $1 $2 || mv -f $1 $2) && rm -f $1
     170# How to touch a file
     171TOUCH = touch $1
    168172# Re-build the original string including the ',' between args. Also escape
    169173# dollars since otherwise ash would expand them.
     
    186190DO.HELP.VARS := $(call ECHO,    MODE={dbg|opt} - choose between debug and optimized build modes.)$(NL)
    187191DO.HELP.VARS += $(call ECHO,    OBJF={omf|aout} - build object files in omf or a.out format.)$(NL)
    188 # The commands to install everything we have built
    189 DO.INSTALL :=
    190 # The list of install directories
    191 INSDIRS :=
    192192# The list of work directories needeed for building all targets
    193193TARGDIRS :=
     
    196196# The list of dependency files
    197197TARGDEPEND :=
    198 
    199 .PHONY: default help all tools clean install cleandep cleandepend dep depend depdone
     198# The list of installed files
     199INS.FILES :=
     200
     201.PHONY: default help all libs tools clean install install cleandep \
     202  cleandepend dep depend depdone
    200203.SUFFIXES:
    201204.SUFFIXES: .c .cpp .asm .s .o .exe .dll .a .lib .obj
     
    210213-include $(SUBMAK)
    211214
    212 # Sort and remove duplicate install directories
     215# Sort and remove duplicate directories
    213216TARGDIRS := $(sort $(TARGDIRS))
    214 INSDIRS := $(sort $(INSDIRS))
     217# Find out which directories are needed for installation
     218INSDIRS := $(sort $(dir $(INS.FILES)))
    215219
    216220#------------ Global targets ------------
     
    223227        @$(call ECHO,    {module-name} - build just a particular module)
    224228        @$(call ECHO,    tools - build just the tools)
     229        @$(call ECHO,    libs - build all libraries)
    225230        @$(call ECHO,    clean - remove all generated files (remove all built files))
    226231        @$(call ECHO,    install - generate a installation tree in $(INS))
     
    250255        @$(call ECHO,Dependency files succesfully updated)
    251256
    252 install: all $(INSDIRS)
    253         $(DO.INSTALL)
     257install: all $(INSDIRS) $(INS.FILES)
    254258
    255259$. $(INSDIRS) $(TARGDIRS):
Note: See TracChangeset for help on using the changeset viewer.