Subversion Repositories Kolibri OS

Rev

Rev 5222 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. LIB_DIR:= $(SDK_DIR)/lib
  3.  
  4. CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -O2
  5. CFLAGS_OPT+= -fomit-frame-pointer -fno-ident -mno-ms-bitfields
  6. CFLAGS_OPT+= -W -Wall -Wmissing-prototypes -Wno-format
  7. CFLAGS   = -c $(CFLAGS_OPT)
  8.  
  9. INCLUDES= -I. -I../bfd -I./config -I../include -I../
  10. INCLUDES+= -I$(SDK_DIR)/sources/newlib/libc/include -I$(SDK_DIR)/sources/zlib
  11.  
  12. DEFINES=  -DHAVE_CONFIG_H -DLOCALEDIR='"/home/autobuild/tools/win32/share/locale"'
  13.  
  14. LIBS= -lopcodes -lbfd -liberty -lz -lgcc -lc.dll -lapp
  15.  
  16. LIBPATH:= -L$(LIB_DIR) -L/home/autobuild/tools/win32/mingw32/lib
  17.  
  18. LDFLAGS = -static -nostdlib --stack 12582912 -T$(SDK_DIR)/sources/newlib/app.lds --image-base 0 --subsystem native
  19.  
  20.  
  21. SRCS = \
  22.         app.c as.c atof-generic.c compress-debug.c      \
  23.         cond.c depend.c dwarf2dbg.c dw2gencfi.c ecoff.c \
  24.         ehopt.c expr.c flonum-copy.c flonum-konst.c     \
  25.         flonum-mult.c frags.c hash.c input-file.c       \
  26.         input-scrub.c listing.c literal.c macro.c       \
  27.         messages.c output-file.c read.c remap.c sb.c    \
  28.         stabs.c subsegs.c symbols.c write.c             \
  29.         config/atof-ieee.c config/obj-coff.c            \
  30.         config/tc-i386.c
  31.  
  32. OBJS  =  $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))
  33.  
  34. # targets
  35.  
  36. all: as
  37.  
  38. as: $(OBJS) Makefile
  39.         $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJS) $(LIBS)
  40.         kos32-objcopy $@ -O binary
  41.  
  42. %.o : %.c Makefile
  43.         $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
  44.  
  45.