2010-09-14 10:47:45 +00:00
|
|
|
.POSIX:
|
|
|
|
|
2011-02-19 12:49:26 +00:00
|
|
|
.SUFFIXES: .c .m .o
|
|
|
|
|
2010-09-14 10:47:45 +00:00
|
|
|
VERSION = 4
|
|
|
|
|
|
|
|
#CC=clang
|
|
|
|
|
2010-10-05 21:49:40 +00:00
|
|
|
CFLAGS += -std=c99 -fPIC
|
2010-10-26 15:44:43 +00:00
|
|
|
CPPFLAGS += -DTYPE_DEPENDENT_DISPATCH -DGNUSTEP
|
2010-10-05 16:09:24 +00:00
|
|
|
CPPFLAGS += -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_SOURCE=500
|
2010-09-14 10:47:45 +00:00
|
|
|
|
2010-10-07 14:18:03 +00:00
|
|
|
PREFIX?= /usr/local
|
|
|
|
LIB_DIR= ${PREFIX}/lib
|
|
|
|
HEADER_DIR= ${PREFIX}/include
|
2010-09-14 10:47:45 +00:00
|
|
|
|
|
|
|
OBJECTS = \
|
|
|
|
NSBlocks.o\
|
|
|
|
Protocol2.o\
|
|
|
|
abi_version.o\
|
|
|
|
blocks_runtime.o\
|
|
|
|
caps.o\
|
|
|
|
category_loader.o\
|
|
|
|
class_table.o\
|
|
|
|
dtable.o\
|
|
|
|
eh_personality.o\
|
|
|
|
encoding2.o\
|
|
|
|
hash_table.o\
|
|
|
|
hooks.o\
|
|
|
|
ivar.o\
|
|
|
|
legacy_malloc.o\
|
|
|
|
loader.o\
|
|
|
|
mutation.o\
|
|
|
|
properties.o\
|
|
|
|
protocol.o\
|
|
|
|
runtime.o\
|
|
|
|
sarray2.o\
|
|
|
|
selector_table.o\
|
|
|
|
sendmsg2.o\
|
|
|
|
statics_loader.o\
|
|
|
|
sync.o
|
|
|
|
|
2010-10-05 21:49:40 +00:00
|
|
|
all: libobjc.so.$(VERSION) libobjc.a
|
2010-09-14 10:47:45 +00:00
|
|
|
|
|
|
|
libobjc.so.$(VERSION): $(OBJECTS)
|
|
|
|
@echo Linking shared library...
|
2010-10-05 21:49:40 +00:00
|
|
|
@ld -shared -o $@ $(OBJECTS)
|
|
|
|
|
|
|
|
libobjc.a: $(OBJECTS)
|
|
|
|
@echo Linking static library...
|
|
|
|
@ld -r -s -o $@ $(OBJECTS)
|
|
|
|
|
2010-09-14 10:47:45 +00:00
|
|
|
.c.o:
|
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
.m.o:
|
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
install: all
|
|
|
|
install -m 444 libobjc.so.$(VERSION) $(LIB_DIR)
|
2010-10-07 14:18:03 +00:00
|
|
|
install -m 444 libobjc.a $(LIB_DIR)
|
2010-09-14 10:47:45 +00:00
|
|
|
ln -sf $(LIB_DIR)/libobjc.so.$(VERSION) $(LIB_DIR)/libobjc.so
|
|
|
|
install -d $(HEADER_DIR)/objc
|
|
|
|
install -m 444 objc/*.h $(HEADER_DIR)/objc
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJECTS)
|
|
|
|
rm -f libobjc.so.$(VERSION)
|
2010-10-05 21:49:40 +00:00
|
|
|
rm -f libobjc.a
|