![]()
Parent Directory
|
Revision Log
a long-neglected checkin
# Main top-level makefile fragment for the vx32 virtual machine. # Compiler flags common to both host and VX32 environment files. COMMON_CFLAGS = -g -O3 -MD -std=gnu99 -I. $(CFLAGS) #COMMON_CFLAGS = -g -MD -std=gnu99 -I. $(CFLAGS) COMMON_LDFLAGS = -g -L. $(LDFLAGS) # Host environment compiler options HOST_CC := $(CC) HOST_LD := $(LD) HOST_AR := $(AR) HOST_LDFLAGS := $(COMMON_LDFLAGS) HOST_CFLAGS := -I$(HOST_ARCH) $(COMMON_CFLAGS) # Compile host code in same floating-point environment as vx32 code: # uncomment this when making comparisons between native and vx32 performance # to ensure an "apples to apples" comparison. HOST_CFLAGS += -msse2 -mfpmath=sse -mno-fp-ret-in-387 #HOST_CFLAGS += -msse2 -mfpmath=sse,387 -mno-fp-ret-in-387 HOST_LDLIBS += -lchost # Stuff for building shared libraries on the host HOST_LTCC = $(LIBTOOL) --mode=compile $(HOST_CC) HOST_LTLD = $(LIBTOOL) --mode=link $(HOST_CC) -rpath $(LIBDIR) HOST_LTAR = $(LIBTOOL) --mode=link $(HOST_CC) -static HOST_LTIN = $(LIBTOOL) --mode=install $(INSTALL) # VX32 environment compiler options VX32_CFLAGS := -nostdinc -Icinc $(COMMON_CFLAGS) #VX32_CFLAGS := -m80387 -mfpmath=sse,387 -nostdinc -Icinc $(COMMON_CFLAGS) VX32_LDFLAGS := -Lclib -L$(dir $(shell $(VX32_CC) -print-libgcc-file-name)) \ $(COMMON_LDFLAGS) clib/vx32/crt0.vo VX32_LDLIBS := -lc -lgcc # Make sure that 'all' is the first target all: # Eliminate default suffix rules .SUFFIXES: # Delete target files if there is an error (or make is interrupted) .DELETE_ON_ERROR: # Include Makefrags for subdirectories include $(HOST_ARCH)/Makefrag include vx/Makefrag include env/Makefrag include clib/Makefrag include cinc/Makefrag include util/Makefrag include test/Makefrag include doc/vx32/Makefrag # How to make .h header files out of .sym symbol files (see gensym.awk) %-sym.c: %.sym awk -f gensym.awk $< >$@ %-sym.s: %-sym.c $(HOST_CC) $(HOST_CFLAGS) -S -o $@ $< %.h: %-sym.s grep mAgIc $< | sed -e 's/mAgIc[^0-9]*//g' >$@ DEPS_FILES := $(wildcard */*.d */*/*.d */*/*/*.d) CLEAN_FILES += .deps $(DEPS_FILES) clean: rm -f $(CLEAN_FILES) # This magic automatically generates makefile dependencies # for header files included from C source files we compile, # and keeps those dependencies up-to-date every time we recompile. # See 'mergedep.pl' for more information. .deps: $(DEPS_FILES) @mkdir -p $(@D) @$(PERL) mergedep.pl $@ $^ -include .deps
| Maintained by PDOS | ViewVC Help |
| Powered by ViewVC 1.0.3 |