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
ifndef PROJDIR
PROJDIR = $(PWD)/../../..
endif
include $(PROJDIR)/Makerules
include $(PROJDIR)/Makefile.inc
INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR)
TARGET = $(LIBEMMMSG)
TARGETS = $(TARGET).a $(TARGET).so
all: $(TARGETS)
%.o: %.c %.h Makefile $(LIBDIR)/$(LIBIES).a $(UTILDIR)/TLVEncoder.h $(UTILDIR)/TLVDecoder.h
@echo Compiling $<
@$(CC) $(CFLAGS) -c $< -o $@
$(TARGET).a: $(OBJS)
@$(RM) $@
@$(AR) $(ARFLAGS) $@ $(OBJS)
@echo Replacing $@ to $(LIBDIR)
@$(RM) $(LIBDIR)/$@
@$(CP) $@ $(LIBDIR)
$(TARGET).so: $(OBJS)
@$(LD) -G -o $@ $(OBJS)
@echo Replacing $@ to $(LIBDIR)
@$(RM) $(LIBDIR)/$@
@$(CP) $@ $(LIBDIR)
clean:
$(RM) $(OBJS) .bak *~
veryclean: clean
$(RM) $(TARGETS)
depend:
makedepend -- ${CFLAGS} -- ${SRCS}
# DO NOT DELETE THIS LINE -- make depend depends on it.