File: Makefile

package info (click to toggle)
unadf 0.7.11a-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,660 kB
  • sloc: ansic: 5,455; cpp: 404; makefile: 127; sh: 78
file content (62 lines) | stat: -rw-r--r-- 1,460 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# ADFLib Makefile for Unix platforms
# tested on Solaris 2.6 and Linux 2.0.36 (RedHat 5.2) 


# real devices routines location
NATIV_DIR = ./Generic

VER=0.7.11
LIBS=libadf.a
SHAREDLIB=libadf.so

AR=ar rc
RANLIB=ranlib
TAR=tar

DEFINES= 

CFLAGS=$(DEFINES) -I${NATIV_DIR} -I.. -I. -Wall -ggdb -std=gnu99
CFLAGS+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)

CC=gcc 
DEPEND=makedepend

LDFLAGS=-L. -ladf
LDFLAGS+=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
LDSHARED=$(CC)

OBJS=	 adf_hd.o adf_disk.o adf_raw.o adf_bitm.o adf_dump.o\
        adf_util.o adf_env.o adf_nativ.o adf_dir.o adf_file.o adf_cache.o \
        adf_link.o adf_salv.o

libadf.a: $(OBJS)
	$(AR) $@ $(OBJS)
	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1

$(SHAREDLIB).$(VER): $(OBJS)
	$(LDSHARED) -o $@ $(OBJS)
	rm -f $(SHAREDLIB) $(SHAREDLIB).1
	ln -s $@ $(SHAREDLIB)
	ln -s $@ $(SHAREDLIB).1


# to define LITT_ENDIAN on little endian machines (intel)
# checks for sizeof(long)=4, sizeof(short)=2, sizeof(int)=4
defendian.h: myconf 
	(./myconf || true)

adf_nativ.o: ${NATIV_DIR}/adf_nativ.c ${NATIV_DIR}/adf_nativ.h
	$(CC) ${CFLAGS} -c ${NATIV_DIR}/adf_nativ.c

clean:
	(rm $(OBJS) $(EXE) defendian.h $(LIBS) $(SHAREDLIB) *~ Win32/*~ Generic/*~) || true
	echo >.depend

src:
	@rm adflib.zip
	@zip -9r adflib.zip *.h *.c Makefile myconf Docs Linux Win32 Refs runtest

dep: defendian.h
	$(DEPEND) -f.depend -v -- $(CFLAGS) --  *.[ch]

include .depend