This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
| 1 |
# go on and adjust here if you don't like those flags |
| 2 |
CFLAGS=-Os -s -pipe -DDEBUG |
| 3 |
#CFLAGS=-Wall -Os -fomit-frame-pointer -s -pipe -DDEBUG |
| 4 |
CC=$(CROSS_COMPILE)gcc |
| 5 |
# likewise, if you want to change the destination prefix |
| 6 |
DESTPREFIX=/usr/local |
| 7 |
DESTDIR=lib |
| 8 |
TARGET=libdl |
| 9 |
DOCS=COPYING README |
| 10 |
RELEASE=$(shell basename `pwd`) |
| 11 |
|
| 12 |
all: static shared |
| 13 |
|
| 14 |
clean: |
| 15 |
rm -f *.o $(TARGET).so* $(TARGET).a |
| 16 |
|
| 17 |
distclean: clean |
| 18 |
rm -f *~ *.s |
| 19 |
|
| 20 |
install: all |
| 21 |
install -d $(DESTPREFIX)/$(DESTDIR) |
| 22 |
install -c $(TARGET) $(DESTPREFIX)/$(DESTDIR) |
| 23 |
|
| 24 |
install-doc: |
| 25 |
install -d $(DESTPREFIX)/share/doc/libdl |
| 26 |
install -c $(DOCS) $(DESTPREFIX)/share/doc/libdl |
| 27 |
|
| 28 |
release: distclean release_gz release_bz2 |
| 29 |
@echo --- $(RELEASE) released --- |
| 30 |
|
| 31 |
release_gz: distclean |
| 32 |
@echo Building tar.gz |
| 33 |
( cd .. ; tar czf $(RELEASE).tar.gz $(RELEASE) ) |
| 34 |
|
| 35 |
release_bz2: distclean |
| 36 |
@echo Building tar.bz2 |
| 37 |
( cd .. ; tar cjf $(RELEASE).tar.bz2 $(RELEASE) ) |
| 38 |
|
| 39 |
static: $(TARGET).o |
| 40 |
$(AR) rcs $(TARGET).a $(TARGET).o |
| 41 |
|
| 42 |
shared: $(TARGET).o |
| 43 |
$(CC) -shared -Wl,-soname,$(TARGET).so.1 -o $(TARGET).so.1.0.0 $(TARGET).o |
| 44 |
|
| 45 |
$(TARGET).o: dl_syscalls.h dl_syscalls.c |
| 46 |
$(CC) -fPIC $(CFLAGS) -c dl_syscalls.c -o $(TARGET).o |