lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 1 | #******************************************************************************* |
| 2 | #******************************************************************************* |
| 3 | include $(COMMON_MK) |
| 4 | |
| 5 | ##############USER COMIZE BEGIN################ |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 6 | EXEC1 = shm_read |
| 7 | OBJS1 = shm_read.o |
| 8 | |
| 9 | EXEC2 = shm_write |
| 10 | OBJS2 = shm_write.o |
| 11 | EXEC3 = shm_test |
| 12 | OBJS3 = shm_test.o |
| 13 | EXEC4 = shm_posix_test |
| 14 | OBJS4 = shm_posix_test.o |
| 15 | |
| 16 | EXEC5 = shm_posix_read |
| 17 | OBJS5 = shm_posix_read.o |
| 18 | |
| 19 | EXEC6 = shm_posix_write |
| 20 | OBJS6 = shm_posix_write.o |
lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 21 | |
| 22 | CFLAGS += -I. |
| 23 | CFLAGS += -I$(APP_DIR)/include |
| 24 | CFLAGS += -I./../inc |
| 25 | |
| 26 | CFLAGS += -g -Werror=implicit-function-declaration |
| 27 | |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 28 | LDLIBS += -lpthread -lrt |
lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 29 | |
| 30 | ##############USER COMIZE END################## |
| 31 | |
| 32 | #******************************************************************************* |
| 33 | # targets |
| 34 | #******************************************************************************* |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 35 | all: $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6) |
lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 36 | |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 37 | $(EXEC1): $(OBJS1) |
lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 38 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| 39 | @cp $@ $@.elf |
| 40 | |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 41 | $(EXEC2): $(OBJS2) |
| 42 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| 43 | @cp $@ $@.elf |
lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 44 | |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 45 | $(EXEC3): $(OBJS3) |
| 46 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| 47 | @cp $@ $@.elf |
| 48 | |
| 49 | $(EXEC4): $(OBJS4) |
| 50 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| 51 | @cp $@ $@.elf |
| 52 | |
| 53 | $(EXEC5): $(OBJS5) |
| 54 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| 55 | @cp $@ $@.elf |
| 56 | |
| 57 | $(EXEC6): $(OBJS6) |
| 58 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| 59 | @cp $@ $@.elf |
lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 60 | romfs: |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 61 | $(ROMFSINST) $(EXEC1) /bin/$(EXEC1) |
| 62 | $(ROMFSINST) $(EXEC2) /bin/$(EXEC2) |
| 63 | $(ROMFSINST) $(EXEC3) /bin/$(EXEC3) |
| 64 | $(ROMFSINST) $(EXEC4) /bin/$(EXEC4) |
| 65 | $(ROMFSINST) $(EXEC5) /bin/$(EXEC5) |
| 66 | $(ROMFSINST) $(EXEC6) /bin/$(EXEC6) |
| 67 | |
lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 68 | clean: |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 69 | -@rm -f $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6) *.elf *.gdb *.o |