1 Adding User Applications to the uClinux Distribution
2 ----------------------------------------------------
11 This document gives simple instructions for adding a user-written application to
12 the uClinux configuration system. Entries must be added to three files, and an
13 apropriate Makefile must exist in the user application source directory, which
14 must be put in user (all directory names here are given relative to the uClinux
15 top directory. In my system this is /home/peter/uClinux-dist).
20 Add a line to the file like
22 dir_$(CONFIG_USER_FOO_FOO) += foo
24 This adds the directory 'foo' to the list of directories to be built. I added
25 mine in alphabetical order. The order doesn't seem to matter.
28 Add lines to the file like
33 This program does fooey things to your bars.
35 Next, there needs to be a proper /user/foo/Makefile. The Makefile should follow
36 the following template:
38 --------------------------------------------
45 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
48 $(ROMFSINST) /bin/$(EXEC)
51 -rm -f $(EXEC) *.elf *.gdb *.o
52 ---------------------------------------------
54 If more than one executable is built in the foo directory, as above, then the
55 Makefile should look like
57 ------------------------------------------------------------
64 $(CC) $(LDFLAGS) -o $@ $@.o $(LDLIBS)
67 $(ROMFSINST) -e CONFIG_USER_FOO_FOO /bin/foo
68 $(ROMFSINST) -e CONFIG_USER_FOO_BAR /bin/bar
69 --------------------------------------------------------------
71 More complex makefiles are of course possible. The reader is encouraged to
72 browse the user tree for examples.
74 When all this is set up, doing the standard 'make xconfig; make dep; make'
75 should build the app and install it in romfs and hence in the target system