blob: 6c1ff736fa34d2ae4125eb9f78d63455bcd91b13 [file] [log] [blame]
#*******************************************************************************
# include build/common makefile
# ÒÔÉú³ÉÁ½¸öÓ¦ÓÃΪÀý£¬Èç¹ûÖ»ÓÐÒ»¸öɾ³ýEXEC2 OBJS2¼´¿É
#*******************************************************************************
include $(COMMON_MK)
EXEC = crc
OBJS = crc.o
#EXEC ÌØÓеÄLIB²ÎÊý
#LDLIBS_demo1 = -lnvram -L$(LIB_DIR)/libnvram
#EXEC2 = demo2
#OBJS2 = demo2.o
#EXEC2 ÌØÓеÄLIB²ÎÊý
#LDLIBS_demo2 = -lsoft_timer -L$(LIB_DIR)/libsoft_timer
#ºêºÍÍ·ÎļþĿ¼ÔÚCFLAGSÀﶨÒ壬ҪÓÃ+=,²»ÒªÓÃ=,·ñÔò»á¸²¸ÇCOMMON_MKÀïµÄÖµ
#CFLAGS += -I$(APP_DIR)/include
#EXEC EXEC2 ¹«¹²LIB²ÎÊý£¬µÚÒ»Ðж¨ÒåLDLIBSÓÃ=£¬²»ÒªÓÃ+=,Ó¦ÓÃÁ¬½ÓµÄ¿â¶¼ÔÚ±¾Makefile¶¨Òå
LDLIBS = -lpthread
#*******************************************************************************
# targets
#*******************************************************************************
all: $(EXEC) $(EXEC2)
$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
@cp $@ $@.elf
$(EXEC2): $(OBJS2)
$(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
@cp $@ $@.elf
romfs:
$(ROMFSINST) $(EXEC) /bin/$(EXEC)
######## $(ROMFSINST) $(EXEC2) /bin/$(EXEC2)
clean:
-@rm -f $(EXEC) $(EXEC2) *.elf *.gdb *.o