Rev 3386 | Rev 4263 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3386 | Rev 4153 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
29 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
30 | # POSSIBILITY OF SUCH DAMAGE. |
30 | # POSSIBILITY OF SUCH DAMAGE. |
31 | 31 | ||
32 | include ../../../version |
32 | include ../../../version |
33 | include ../../Makefile.config |
- | |
34 | 33 | ||
35 | LIBC_PREFIX = ../../lib/libc |
34 | LIBC_PREFIX = ../../lib/libc |
36 | SOFTINT_PREFIX = ../../lib/softint |
35 | SOFTINT_PREFIX = ../../lib/softint |
- | 36 | ||
37 | include $(LIBC_PREFIX)/Makefile.toolchain |
37 | include $(LIBC_PREFIX)/Makefile.toolchain |
38 | 38 | ||
39 | CFLAGS += -I../../srv/kbd/include |
39 | CFLAGS += -I../../srv/kbd/include |
40 | 40 | ||
41 | LIBS = $(LIBC_PREFIX)/libc.a |
41 | LIBS = $(LIBC_PREFIX)/libc.a |
42 | DEFS += -DRELEASE=\"$(RELEASE)\" |
42 | DEFS += -DRELEASE=$(RELEASE) |
43 | - | ||
44 | ifdef REVISION |
- | |
45 | DEFS += "-DREVISION=\"$(TIMESTAMP)\"" |
- | |
46 | endif |
- | |
47 | - | ||
48 | ifdef TIMESTAMP |
- | |
49 | DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
- | |
50 | endif |
- | |
51 | 43 | ||
52 | PROGRAM = bdsh |
44 | PROGRAM = bdsh |
53 | 45 | ||
54 | # Any directory that cleaning targets should know about |
46 | # Any directory that cleaning targets should know about |
55 | SUBDIRS = \ |
47 | SUBDIRS = \ |
56 | ./ \ |
48 | ./ \ |
57 | cmds/ \ |
49 | cmds/ \ |
58 | cmds/modules/ \ |
50 | cmds/modules/ \ |
59 | cmds/modules/help/ \ |
51 | cmds/modules/help/ \ |
60 | cmds/modules/quit/ \ |
- | |
61 | cmds/modules/mkdir/ \ |
52 | cmds/modules/mkdir/ \ |
62 | cmds/modules/rm/ \ |
53 | cmds/modules/rm/ \ |
63 | cmds/modules/cat/ \ |
54 | cmds/modules/cat/ \ |
64 | cmds/modules/touch/ \ |
55 | cmds/modules/touch/ \ |
65 | cmds/modules/ls/ \ |
56 | cmds/modules/ls/ \ |
66 | cmds/modules/pwd/ \ |
57 | cmds/modules/pwd/ \ |
- | 58 | cmds/modules/sleep/ \ |
|
- | 59 | cmds/modules/cp/ \ |
|
67 | cmds/builtins/ \ |
60 | cmds/builtins/ \ |
- | 61 | cmds/builtins/exit/\ |
|
68 | cmds/builtins/cd/ |
62 | cmds/builtins/cd/ |
69 | 63 | ||
70 | SOURCES = \ |
64 | SOURCES = \ |
71 | cmds/modules/help/help.c \ |
65 | cmds/modules/help/help.c \ |
72 | cmds/modules/quit/quit.c \ |
- | |
73 | cmds/modules/mkdir/mkdir.c \ |
66 | cmds/modules/mkdir/mkdir.c \ |
74 | cmds/modules/rm/rm.c \ |
67 | cmds/modules/rm/rm.c \ |
75 | cmds/modules/cat/cat.c \ |
68 | cmds/modules/cat/cat.c \ |
76 | cmds/modules/touch/touch.c \ |
69 | cmds/modules/touch/touch.c \ |
77 | cmds/modules/ls/ls.c \ |
70 | cmds/modules/ls/ls.c \ |
78 | cmds/modules/pwd/pwd.c \ |
71 | cmds/modules/pwd/pwd.c \ |
- | 72 | cmds/modules/sleep/sleep.c \ |
|
- | 73 | cmds/modules/cp/cp.c \ |
|
- | 74 | cmds/builtins/exit/exit.c \ |
|
79 | cmds/builtins/cd/cd.c \ |
75 | cmds/builtins/cd/cd.c \ |
80 | cmds/mod_cmds.c \ |
76 | cmds/mod_cmds.c \ |
81 | cmds/builtin_cmds.c \ |
77 | cmds/builtin_cmds.c \ |
82 | errors.c \ |
78 | errors.c \ |
83 | input.c \ |
79 | input.c \ |
Line 106... | Line 102... | ||
106 | %.o: %.c |
102 | %.o: %.c |
107 | $(CC) $(CFLAGS) $(INC) -c $< -o $@ |
103 | $(CC) $(CFLAGS) $(INC) -c $< -o $@ |
108 | @$(CC) -M $(CFLAGS) $(INC) $*.c > $*.d |
104 | @$(CC) -M $(CFLAGS) $(INC) $*.c > $*.d |
109 | 105 | ||
110 | $(PROGRAM): $(OBJECTS) $(LIBS) |
106 | $(PROGRAM): $(OBJECTS) $(LIBS) |
111 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(PROGRAM).map |
107 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(PROGRAM).map |
112 | 108 | ||
113 | # Everything else is a phony target |
109 | # Everything else is a phony target |
114 | .PHONY: all clean distclean depend disasm |
110 | .PHONY: all clean distclean depend disasm |
115 | 111 | ||
116 | all: $(PROGRAM) disasm |
112 | all: $(PROGRAM) disasm |