kolibrios/contrib/toolchain/binutils/opcodes/Makefile
maxcodehack dc2f211987 Fix libopcodes building
git-svn-id: svn://kolibrios.org@8358 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-12-10 09:38:13 +00:00

33 lines
763 B
Makefile

CC = kos32-gcc
LD = kos32-ld
SDK_DIR = ../../../sdk
CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -O2
CFLAGS_OPT+= -fomit-frame-pointer -fno-ident -mno-ms-bitfields
CFLAGS_OPT+= -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror
CFLAGS = -c $(CFLAGS_OPT)
INCLUDES= -I. -I../bfd -I../include -I$(SDK_DIR)/sources/newlib/libc/include
DEFINES= -DHAVE_CONFIG_H
SRCS = \
dis-buf.c disassemble.c \
dis-init.o i386-dis.o \
i386-opc.o
OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))
# targets
all: libopcodes.a
libopcodes.a: $(OBJS) Makefile
$(AR) crs $@ $(OBJS)
mv -f $@ $(SDK_DIR)/lib
%.o : %.c Makefile
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<