blob: 90a203f69ef8925d3c93394a966fc70af8448b22 [file] [log] [blame]
lh758261d2023-07-13 05:52:04 -07001#*******************************************************************************
2#*******************************************************************************
3include $(COMMON_MK)
4
5##############USER COMIZE BEGIN################
xf.li6c8fc1e2023-08-12 00:11:09 -07006EXEC1 = shm_read
7OBJS1 = shm_read.o
8
9EXEC2 = shm_write
10OBJS2 = shm_write.o
11EXEC3 = shm_test
12OBJS3 = shm_test.o
13EXEC4 = shm_posix_test
14OBJS4 = shm_posix_test.o
15
16EXEC5 = shm_posix_read
17OBJS5 = shm_posix_read.o
18
19EXEC6 = shm_posix_write
20OBJS6 = shm_posix_write.o
lh758261d2023-07-13 05:52:04 -070021
22CFLAGS += -I.
23CFLAGS += -I$(APP_DIR)/include
24CFLAGS += -I./../inc
25
26CFLAGS += -g -Werror=implicit-function-declaration
27
xf.li6c8fc1e2023-08-12 00:11:09 -070028LDLIBS += -lpthread -lrt
lh758261d2023-07-13 05:52:04 -070029
30##############USER COMIZE END##################
31
32#*******************************************************************************
33# targets
34#*******************************************************************************
xf.li6c8fc1e2023-08-12 00:11:09 -070035all: $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6)
lh758261d2023-07-13 05:52:04 -070036
xf.li6c8fc1e2023-08-12 00:11:09 -070037$(EXEC1): $(OBJS1)
lh758261d2023-07-13 05:52:04 -070038 $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
39 @cp $@ $@.elf
40
xf.li6c8fc1e2023-08-12 00:11:09 -070041$(EXEC2): $(OBJS2)
42 $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
43 @cp $@ $@.elf
lh758261d2023-07-13 05:52:04 -070044
xf.li6c8fc1e2023-08-12 00:11:09 -070045$(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
lh758261d2023-07-13 05:52:04 -070060romfs:
xf.li6c8fc1e2023-08-12 00:11:09 -070061 $(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
lh758261d2023-07-13 05:52:04 -070068clean:
xf.li6c8fc1e2023-08-12 00:11:09 -070069 -@rm -f $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6) *.elf *.gdb *.o