| #******************************************************************************* |
| #******************************************************************************* |
| include $(COMMON_MK) |
| |
| ##############USER COMIZE BEGIN################ |
| EXEC1 = shm_read |
| OBJS1 = shm_read.o |
| |
| EXEC2 = shm_write |
| OBJS2 = shm_write.o |
| EXEC3 = shm_test |
| OBJS3 = shm_test.o |
| EXEC4 = shm_posix_test |
| OBJS4 = shm_posix_test.o |
| |
| EXEC5 = shm_posix_read |
| OBJS5 = shm_posix_read.o |
| |
| EXEC6 = shm_posix_write |
| OBJS6 = shm_posix_write.o |
| |
| CFLAGS += -I. |
| CFLAGS += -I$(APP_DIR)/include |
| CFLAGS += -I./../inc |
| |
| CFLAGS += -g -Werror=implicit-function-declaration |
| |
| LDLIBS += -lpthread -lrt |
| |
| ##############USER COMIZE END################## |
| |
| #******************************************************************************* |
| # targets |
| #******************************************************************************* |
| all: $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6) |
| |
| $(EXEC1): $(OBJS1) |
| $(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 |
| |
| $(EXEC3): $(OBJS3) |
| $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| @cp $@ $@.elf |
| |
| $(EXEC4): $(OBJS4) |
| $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| @cp $@ $@.elf |
| |
| $(EXEC5): $(OBJS5) |
| $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| @cp $@ $@.elf |
| |
| $(EXEC6): $(OBJS6) |
| $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| @cp $@ $@.elf |
| romfs: |
| $(ROMFSINST) $(EXEC1) /bin/$(EXEC1) |
| $(ROMFSINST) $(EXEC2) /bin/$(EXEC2) |
| $(ROMFSINST) $(EXEC3) /bin/$(EXEC3) |
| $(ROMFSINST) $(EXEC4) /bin/$(EXEC4) |
| $(ROMFSINST) $(EXEC5) /bin/$(EXEC5) |
| $(ROMFSINST) $(EXEC6) /bin/$(EXEC6) |
| |
| clean: |
| -@rm -f $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6) *.elf *.gdb *.o |