* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / linux86-0.16.17 / elksemu / Makefile
blobdf97c2d43c27cfab3cdc2196fe4bf699a90bf97c
2 # Makefile for elksemu.
5 # Use BCC to make a tiny static a.out version.
6 ifeq ($(CC),bcc)
7 CFLAGS=-Ml -ansi -s $(DEFS)
8 endif
9 ifeq ($(CC),ncc)
10 CFLAGS=-Ml -ansi -s $(DEFS)
11 endif
13 # Default
14 ifeq ($(CFLAGS),)
15 CFLAGS=-O
16 endif
18 # Turn on elkemu's strace like facility.
19 # DEFS=-DDEBUG
21 # For gcc making a.out with a basically ELF compiler
22 # CFLAGS=-O2 -fno-strength-reduce -b i486-linuxaout -N -s -static
24 OBJ=elks.o elks_sys.o elks_signal.o minix.o
26 elksemu: $(OBJ)
27 $(CC) $(CFLAGS) -o $@ $^
29 elks_sys.o: call_tab.v efile.h
30 $(OBJ): elks.h
32 call_tab.v: dummy
33 -cp -p ../libc/syscall/call_tab.v . 2>/dev/null
34 -cp -p ../libc/syscall/defn_tab.v . 2>/dev/null
36 efile.h: ../libc/error/liberror.txt
37 sh mkefile ../libc/error/liberror.txt
39 dummy:
41 # The kernel patch or module _requires_ this location but binfmt-misc is easy
42 # to redirect.
43 install: elksemu
44 install -d $(DIST)/lib
45 install -s -o root -g root -m 4555 elksemu $(DIST)/lib/elksemu
47 clean realclean:
48 rm -f $(OBJ) binfmt_elks.o elksemu call_tab.v defn_tab.v efile.h
50 module: binfmt_elks.o
52 # HOW to compile the module...
53 # BUT remember you don't need it for a recent 2.1.X; use binfmt_misc.
55 # This matches my compile (2.0.x); yours may be different.
56 MODCFLAGS=-D__KERNEL__ -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
57 -fno-strength-reduce -pipe -m486 -DCPU=486 -DMODULE -DMODVERSIONS \
58 -include /usr/include/linux/modversions.h
60 binfmt_elks.o: binfmt_elks.c
61 gcc -c $(MODCFLAGS) binfmt_elks.c
63 # This is another option
64 #MODCFLAGS=-O -fomit-frame-pointer -DCPU=386 -D__KERNEL__ -DMODULE
65 # Or this ...
66 #MODCFLAGS=-O -fomit-frame-pointer -D__KERNEL__ -DMODULE -DCONFIG_MODVERSIONS