Changeset 427


Ignore:
Timestamp:
Jul 23, 2003, 3:18:54 AM (22 years ago)
Author:
bird
Message:

#564: Build everything with debug info. Removed obsolete options. Added a few hacks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/Makefile

    • Property cvs2svn:cvs-rev changed from 1.24 to 1.25
    r426 r427  
    2828CPU = 386
    2929# The object file format to use for tools (emxomf, ld and friends)
    30 TOOLFMT.dbg = aout
     30TOOLFMT.dbg = omf
    3131TOOLFMT.opt = omf
    3232TOOLFMT = $(TOOLFMT.$(MODE))
     
    4949CC = gcc -c -Zmt
    5050# The C compiler flags
    51 CFLAGS.INC = -Iinclude -Isrc/include
    52 CFLAGS = -Wall -mstack-arg-probe $(CFLAGS.INC) $(CFLAGS.$(MODE)) $(CFLAGS.KIND)
     51CFLAGS.INC  = -Iinclude -Isrc/include
     52CFLAGS      = -Wall -mstack-arg-probe $(CFLAGS.INC) $(CFLAGS.$(MODE)) $(CFLAGS.KIND)
    5353# The additional C compiler flags for different build modes
    54 CFLAGS.opt = -s -O3
    55 CFLAGS.dbg = -g -DDEBUG
     54CFLAGS.opt  = -g -O3
     55CFLAGS.dbg  = -g -DDEBUG
    5656CFLAGS.aout =
    57 CFLAGS.omf = -Zomf
     57CFLAGS.omf  = -Zomf
    5858CFLAGS.prof = -pg
    5959# The object files are put in subdirectory objectformat-targetkind,
     
    6565
    6666# The linker
    67 LD = gcc -Zmt
     67LD = gcc
    6868# Linker flags
    69 LDFLAGS = $(LDFLAGS.$(MODE)) $(LDFLAGS.KIND) -Zstack 1024
     69LDFLAGS     = $(LDFLAGS.$(MODE)) $(LDFLAGS.KIND) -Zmap -Zstack 1024
    7070LDFLAGS.DLL = $(LDFLAGS) -Zdll
    7171# Linker flags for different build modes
    72 LDFLAGS.opt = -s -Zcrtdll=c_dll
     72LDFLAGS.opt = -g -Zcrtdll=c_dll
    7373LDFLAGS.dbg = -g
    7474LDFLAGS.aout =
    75 LDFLAGS.omf = -Zomf -Zsys -Zlinker /PM:VIO
     75LDFLAGS.omf = -Zomf -Zlinker /PM:VIO -Zlinker /LINENUMBERS
    7676LDFLAGS.prof = -pg
    7777# Linker flags for different kinds of target
     
    9090#               shared, data segment is not shared, but must be reloaded page by page
    9191#               from the executable in new processes. </rant>
     92# URG! we must not do this for ldstub.bin!
    9293ifeq ($(MODE),opt)
    93 DO.LINK.exe += $(NL)lxlite /X /AS $@
    94 DO.LINK.dll += $(NL)lxlite /X /AS $@
     94DO.LINK.exe += $(if $(findstring .exe,$@), $(NL)cp $@ $(basename $@).dbg $(NL)lxlite /X /AS $@)
     95DO.LINK.dll += $(NL)cp $@ $(basename $@).dbg $(NL)lxlite /X /AS $@
    9596endif
    9697
     
    144145#       must use the shell.
    145146EMXOMF = `test -f '$.$(TOOLFMT)/emxomf$E' && echo '$.$(TOOLFMT)/'`emxomf$E
    146 DO.EMXOMF = $(EMXOMF) $(strip $1 -o) $@ $<
     147DO.EMXOMF = $(EMXOMF) $(strip $1 -o) $@ $(if $<,$<, $(subst /omf/,/aout/,$(@:.obj=.o)) )
    147148
    148149# How to filter just the object files from $^
     
    283284
    284285# The general a.out -> OMF conversion rule for object files
    285 $.omf/%.obj:
     286$.omf/%.obj:   
    286287        $(call DO.EMXOMF)
    287288
Note: See TracChangeset for help on using the changeset viewer.