blob: 6c1ff736fa34d2ae4125eb9f78d63455bcd91b13 [file] [log] [blame]
xf.libdd93d52023-05-12 07:10:14 -07001#*******************************************************************************
2# include build/common makefile
3# ÒÔÉú³ÉÁ½¸öÓ¦ÓÃΪÀý£¬Èç¹ûÖ»ÓÐÒ»¸öɾ³ýEXEC2 OBJS2¼´¿É
4#*******************************************************************************
5include $(COMMON_MK)
6
7EXEC = crc
8OBJS = crc.o
9#EXEC ÌØÓеÄLIB²ÎÊý
10#LDLIBS_demo1 = -lnvram -L$(LIB_DIR)/libnvram
11
12#EXEC2 = demo2
13#OBJS2 = demo2.o
14#EXEC2 ÌØÓеÄLIB²ÎÊý
15#LDLIBS_demo2 = -lsoft_timer -L$(LIB_DIR)/libsoft_timer
16
17#ºêºÍÍ·ÎļþĿ¼ÔÚCFLAGSÀﶨÒ壬ҪÓÃ+=,²»ÒªÓÃ=,·ñÔò»á¸²¸ÇCOMMON_MKÀïµÄÖµ
18#CFLAGS += -I$(APP_DIR)/include
19
20#EXEC EXEC2 ¹«¹²LIB²ÎÊý£¬µÚÒ»Ðж¨ÒåLDLIBSÓÃ=£¬²»ÒªÓÃ+=,Ó¦ÓÃÁ¬½ÓµÄ¿â¶¼ÔÚ±¾Makefile¶¨Òå
21LDLIBS = -lpthread
22
23#*******************************************************************************
24# targets
25#*******************************************************************************
26all: $(EXEC) $(EXEC2)
27
28$(EXEC): $(OBJS)
29 $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
30 @cp $@ $@.elf
31
32$(EXEC2): $(OBJS2)
33 $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
34 @cp $@ $@.elf
35
36romfs:
37 $(ROMFSINST) $(EXEC) /bin/$(EXEC)
38######## $(ROMFSINST) $(EXEC2) /bin/$(EXEC2)
39
40clean:
41 -@rm -f $(EXEC) $(EXEC2) *.elf *.gdb *.o