File: Makefile

package info (click to toggle)
cf-python 1.3.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,996 kB
  • sloc: python: 51,733; ansic: 2,736; makefile: 78; sh: 2
file content (40 lines) | stat: -rw-r--r-- 870 bytes parent folder | download
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
HEADERS=umfile.h umfileint.h bits/*.h

LIBRARY=umfile.so

CC ?= gcc
CFLAGS += -Wall -fPIC -g
CPP ?= gcc -E -P
LDFLAGS += -shared
OBJS = umfile.o error.o filetype.o \
	malloc.o linklist.o new_structs.o swap.o

TYPE_DEP_LIBRARY = umfile_typedep.a
TYPE_DEP_DIR = type-dep
TYPE_DEP_LIBRARY_PATH = $(TYPE_DEP_DIR)/$(TYPE_DEP_LIBRARY)

export CC CFLAGS CPP TYPE_DEP_LIBRARY

.PHONY: clean all type-dep

all: $(LIBRARY)

clean:
	rm -f $(OBJS)
	$(MAKE) -C $(TYPE_DEP_DIR) clean

type-dep:
	$(MAKE) -C $(TYPE_DEP_DIR)

$(LIBRARY): $(OBJS) type-dep
	$(CC) $(LDFLAGS) $(TARGET_ARCH) \
        $(OBJS) -Wl,--whole-archive $(TYPE_DEP_LIBRARY_PATH) -Wl,--no-whole-archive \
        $(LDLIBS) -o $@

%.o: %.c $(HEADERS)

#bits/protos_sgl.h: bits/type_dep_protos.h
#	$(CPP) -DBUILD_HDR -DSINGLE $< > $@
#
#bits/protos_dbl.h: bits/type_dep_protos.h
#	$(CPP) -DBUILD_HDR -DDOUBLE $< > $@