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