No catalogs available.
[AROS.git] / tools / adflib / Makefile
blob1160751ed03fc382a46c9ed31d111fe559f56711
1 # ADFLib Makefile for Unix platforms
2 # tested on Solaris 2.6 and Linux 2.0.36 (RedHat 5.2)
5 # real devices routines location
6 NATIV_DIR = ./Generic
8 VER=0.7.8
9 LIBS=libadf.a
10 SHAREDLIB=libadf.so
12 AR=ar rc
13 RANLIB=ranlib
14 TAR=tar
16 DEFINES=
18 CFLAGS=$(DEFINES) -I${NATIV_DIR} -I.. -I. -Wall -O2 -pedantic
20 CC=gcc
21 DEPEND=makedepend
23 LDFLAGS=-L. -ladf
24 LDSHARED=$(CC)
26 OBJS=adf_hd.o adf_disk.o adf_raw.o adf_bitm.o adf_dump.o\
27 adf_util.o adf_env.o adf_nativ.o adf_dir.o adf_file.o adf_cache.o \
28 adf_link.o adf_salv.o
30 libadf.a: $(OBJS)
31 $(AR) $@ $(OBJS)
32 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
34 $(SHAREDLIB).$(VER): $(OBJS)
35 $(LDSHARED) -o $@ $(OBJS)
36 rm -f $(SHAREDLIB) $(SHAREDLIB).1
37 ln -s $@ $(SHAREDLIB)
38 ln -s $@ $(SHAREDLIB).1
41 # to define LITT_ENDIAN on little endian machines (intel)
42 # checks for sizeof(long)=4, sizeof(short)=2, sizeof(int)=4
43 defendian.h: myconf
44 myconf
46 adf_nativ.o: ${NATIV_DIR}/adf_nativ.c ${NATIV_DIR}/adf_nativ.h
47 $(CC) ${CFLAGS} -c ${NATIV_DIR}/adf_nativ.c
49 clean:
50 @rm $(OBJS) $(EXE) defendian.h $(LIBS) $(SHAREDLIB)
52 src:
53 @rm adflib.zip
54 @zip -9r adflib.zip *.h *.c Makefile myconf Docs Linux Win32 Refs runtest
56 depend: defendian.h
57 $(DEPEND) -v -- $(CFLAGS) -- *.[ch]
60 # DO NOT DELETE THIS LINE -- make depend depends on it.