blob: f4fa4c68a1ffbed669d8638cb7c21ecaca4ce76c [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001#*******************************************************************************
2# include ZTE library makefile
3#*******************************************************************************
4#include $(COMMON_MK)
5
6##############USER COMIZE BEGIN################
7LIB_STATIC = libmtd.a
8LIB_SHARED = libmtd.so
9
10OBJS = mtd.o
11
12CFLAGS += -g -I.
13# off_t:32 bits -> 64 bits
14CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
15#LDFLAGS += -lpthread
16##############USER COMIZE END##################
17
18CFLAGS += -fPIC
19
20CFLAGS += -I$(zte_app_path)/include
21
22LDFLAGS += -shared
23
24all: $(LIB_STATIC) $(LIB_SHARED)
25
26$(LIB_STATIC) : $(OBJS)
27 $(AR) rcs $(LIB_STATIC) $(OBJS)
28
29$(LIB_SHARED): $(OBJS)
30 $(CC) $(LDFLAGS) -o $@ $^
31
32romfs:
33 $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
34
35clean:
36 -$(RM) *.a *.o *.so $(LIB_SHARED) $(LIB_STATIC) $(OBJS)
37