Don't crash when board size is changed.
[AROS-Contrib.git] / gnu / abc-shell / Makefile
blob0ba31ab659e0691ff0ba5790a494d901298cd9a3
2 # Makefile for Amiga Bourne Compatible Shell.
5 .PHONY: all clean debug
7 ifndef (CRT)
8 CRT = clib2
9 endif
11 DEBUG = -DNDEBUG
13 CC = ppc-amigaos-gcc
14 STRIP = ppc-amigaos-strip -R.comment $@
16 CFLAGS = -mcrt=$(CRT) -Wall -Wwrite-strings -O2 $(DEBUG)
17 LDFLAGS = -mcrt=$(CRT)
18 CPPFLAGS = -mcrt=$(CRT) -DAMIGA -DPOSIXLY_CORRECT -DHISTORY -DAUTOINIT -D__STDC_VERSION__=199901L
20 ifeq ($(CRT), newlib)
21 LIBS = -lunix
22 else
23 LIBS = -lnet -lm -lunix
24 endif
26 SRCS = amigaos.c alloc.c c_ksh.c c_sh.c c_test.c environ.c eval.c exec.c \
27 expr.c history.c io.c jobs.c lex.c main.c misc.c missing.c path.c \
28 shf.c sigact.c syn.c table.c trap.c tree.c tty.c var.c version.c
29 OBJS = $(SRCS:.c=.o)
30 DEPS = $(OBJS:.o=.d)
32 all: sh
33 @echo done.
35 debug: DEBUG = -ggdb
36 debug: STRIP =
37 debug: all
39 sh: $(OBJS)
40 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
41 $(STRIP)
43 %.o : %.c
44 $(CC) -MM -MP $(INCDIRS) $< >$*.d
45 $(CC) -c $(CPPFLAGS) -I. $(CFLAGS) $<
47 clean:
48 rm -f sh $(OBJS) $(DEPS) *~
50 -include $(SRCS:.c=.d)