# Makefile for the boot monitor package.
+# XXX: Can only be built with ACK currently
+CC:=${CC:C/^gcc/cc/}
+COMPILER_TYPE:=ack
+
PROGS= bootblock cdbootblock bootexec boot masterboot \
jumpboot installboot edparams
SRCS= archiver.c print.c rd.c rd_arhdr.c rd_unsig2.c sprint.c \
wr_arhdr.c wr_bytes.c wr_int2.c wr_long.c wr_ranlib.c \
format.c rd_bytes.c system.c write.c long2str.c
-CPPFLAGS+= -I${.CURDIR} -wo -DAAL -DSTB -DNDEBUG -DDISTRIBUTION
+CPPFLAGS+= -I${.CURDIR} -DAAL -DSTB -DNDEBUG -DDISTRIBUTION
LINKS+= ${BINDIR}/aal ${BINDIR}/ar
MAN=
}
tnum++;
}
-#endif AAL
+#endif /* AAL */
# define ACKM "minix"
/* size of local machine, either 0 (for 16 bit address space), or 1 */
-# undef BIGMACHINE 1
+# undef BIGMACHINE
/* operating system, SYS_5, V7, BSD4_1 or BSD4_2; Do NOT delete the comment
in the next line! */
/* system's idea of block */
#define BUFSIZ 1024
-#endif __SYSTEM_INCLUDED__
+#endif /* __SYSTEM_INCLUDED__ */
PROGS= anm asize
SRCS.anm= anm.c rd.c rd_arhdr.c rd_bytes.c rd_unsig2.c
SRCS.asize= asize.c
-CPPFLAGS+= -I${.CURDIR} -wo
+CPPFLAGS+= -I${.CURDIR}
MAN.anm=
MAN.asize=
#
#DEFS = -DUNIX -DMALLOCH
DEFS= -DUNIX -DUSG -DSTDLIB
-CPPFLAGS+= -i -f -wo ${DEFS}
+CPPFLAGS+= ${DEFS}
PROGS= bsfilt cawf
SRCS.cawf= cawf.c device.c error.c expand.c expr.c getopt.c macsup.c nreq.c \
PROG= dis88
SRCS= disrel.c dismain.c distabs.c dishand.c disfp.c
-CPPFLAGS+= -wo
MAN=
.include <minix.prog.mk>
# Makefile for elle
+# XXX: Can only be built with ACK currently
+CC:=${CC:C/^gcc/cc/}
+COMPILER_TYPE:=ack
+
PROGS= ellec elle
SRCS.elle= eemain.c eecmds.c eesite.c eevini.c eedisp.c eeterm.c eeerr.c \
eeques.c eebuff.c eefile.c eefed.c eeedit.c eebit.c eef1.c \
PROG= ftp
SRCS= ftp.c local.c file.c xfer.c other.c net.c crc.c
-CPPFLAGS+= -DCRC_ONLY -m
+CPPFLAGS+= -DCRC_ONLY
.include <minix.prog.mk>
PROG= in.ftpd
SRCS= ftpd.c access.c file.c net.c
-CPPFLAGS+= -m
MAN= ftpd.8
SCRIPTS= ftpdsh
FILES= setup.anonftp
PROG= indent
SRCS= args.c comment.c lexi.c indent.c parse.c io.c
-CPPFLAGS+= -wo -m
MAN=
.include <minix.prog.mk>
PROG= mined
SRCS= mined1.c mined2.c
-CPPFLAGS+= -wo
MAN=
.include <minix.prog.mk>
s/.*"\(.*\)".*/\1/
s:^\./::' \
-e '/^<built-in>$/d' \
- -e '/^<command line>$/d' \
+ -e '/^<command.line>$/d' \
-e "s:^:$o\: :" | \
sort -u
done
PROG= patch
SRCS= patch.c pch.c inp.c util.c version.c
-CPPFLAGS+= -DVOIDSIG -wo -DSMALL
+CPPFLAGS+= -DVOIDSIG -DSMALL
MAN=
.include <minix.prog.mk>
/* void lock_kernel(void) { assert(0); } */
/* void unlock_kernel(void) { assert(0); } */
-void __asm__(char *str) { assert(0); }
+/* void __asm__(char *str) { assert(0); } */
extern void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot)
{ assert(0); }
void lock_kernel(void);
void unlock_kernel(void);
-void __asm__(char *str);
+/* void __asm__(char *str); */
#define for_each_task(t) for(t= task_list; t; t=t->next)
extern struct task_struct *task_list;
#include "swifi.h"
#include "extra.h"
-
+#include <assert.h>
#define CRASH_INTERVAL 8192
#define FI_MASK 0xfff
addr1 = (unsigned long *) 0xf0212000;
addr2 = (unsigned long *) 0xf0212010;
PDEBUG(("%p=%lx, %p=%lx\n", addr1, *addr1, addr2, *addr2));
+ /*
__asm__ ("movl $0xf0212000, %eax\n\t" \
"movl $6, 0(%eax)\n\t" \
"movl $6, 4(%eax)\n\t");
+ */
+ /* Not implemented on MINIX */
+ assert(0);
addr1 = (unsigned long *) 0xf0212000;
addr2 = (unsigned long *) 0xf0212010;
PDEBUG(("after injecting fault\n"));
case DEBUGGER_FAULT:
PDEBUG(("Debugger fault"));
+ /*
__asm__ ("movl %cr4, %ecx\n\t" \
"movl $42, %ecx; .byte 0x0f, 0x32\n\t" \
"movl $377, %ecx; .byte 0x0f, 0x32\n\t");
+ */
+ /* Not implemented on MINIX */
+ assert(0);
result = 0;
break;
default: PDEBUG(("unknown fault type %ld\n", faultType)); break;
PROG= synctree
-CPPFLAGS+= -wo
MAN=
.include <minix.prog.mk>
# yap Makefile
+# XXX: Can only be built with ACK currently
+CC:=${CC:C/^gcc/cc/}
+COMPILER_TYPE:=ack
+
PROG= yap
SRCS= assert.c commands.c display.c getcomm.c getline.c help.c \
keys.c machine.c main.c options.c output.c pattern.c \
# Makefile for zmodem
PROGS= rz sz
-CPPFLAGS+= -DPOSIX -wo
+CPPFLAGS+= -DPOSIX
MAN.rz=
MAN.sz=
pci sh service sysenv mfs
EXTRA=system.conf passwd
+CPPFLAGS+= -I${MINIXSRCDIR}/servers
MAKEDEV=/usr/bin/MAKEDEV
all: image.c
boot
-200 400
+500 400
d--755 0 0
bin d--755 0 0
at_wini ---755 0 0 at_wini
+CPPFLAGS+= -wo
+
.SUFFIXES: .o .e .S
# Treated like a C file
# some of the rules involve .h sources, so remove them from mkdep line
.if defined(SRCS) # {
-_TRADITIONAL_CPP?=-traditional-cpp
+#_TRADITIONAL_CPP?=-traditional-cpp
__acpp_flags= ${_TRADITIONAL_CPP}
__DPSRCS.all= ${SRCS:C/\.(c|m|s|S|C|cc|cpp|cxx)$/.d/} \
AFLAGS+=-D__ASSEMBLY__ -D_EM_WSIZE=4 -D__minix
-
MAKECONF?= /etc/make.conf
.-include "${MAKECONF}"
-#Set to ack by default
-COMPILER_TYPE?=ack
-
#
# CPU model, derived from MACHINE_ARCH
#
AFLAGS?=
COMPILE.s?= ${CC} ${AFLAGS} -c
LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
+#COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
+COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c
LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
CC?= cc
# rm -f ${.TARGET}
# cp ${.IMPSRC} ${.TARGET}
# chmod a+x ${.TARGET}
+
+# MINIX
+.if !empty(CC:Mcc)
+COMPILER_TYPE=ack
+.elif !empty(CC:Mgcc)
+COMPILER_TYPE=gnu
+AR=gar
+.endif
DPADD+= ${LIBTIMERS} ${LIBSYS}
LDADD+= -ltimers -lsys
-LDFLAGS+= -.o
+.if ${COMPILER_TYPE} == "ack"
+LDFLAGS+= -.o
+.elif ${COMPILER_TYPE} == "gnu"
+CPPFLAGS+= -fno-builtin -ffreestanding -fno-stack-protector
+LDFLAGS+= -T arch/${ARCH}/kernel.lds
+LDFLAGS+= -nostdlib
+DPADD+= ${LIBC}
+LDADD+= -lgcc -lc -lgcc
+.endif
+
CPPFLAGS+= -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}
AFLAGS+= -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}
-#Tell ASMCONV to prepend underscores to symbols
-ASMCONVFLAGS+= -u
-
INSTALLFLAGS+= -S 0
BINDIR= /usr/sbin
MAN=
#include "sconst.h"
#include "apic_asm.h"
-.globl apic_hwint00 /* handlers for hardware interrupts */
-.globl apic_hwint01
-.globl apic_hwint02
-.globl apic_hwint03
-.globl apic_hwint04
-.globl apic_hwint05
-.globl apic_hwint06
-.globl apic_hwint07
-.globl apic_hwint08
-.globl apic_hwint09
-.globl apic_hwint10
-.globl apic_hwint11
-.globl apic_hwint12
-.globl apic_hwint13
-.globl apic_hwint14
-.globl apic_hwint15
+.globl _apic_hwint00 /* handlers for hardware interrupts */
+.globl _apic_hwint01
+.globl _apic_hwint02
+.globl _apic_hwint03
+.globl _apic_hwint04
+.globl _apic_hwint05
+.globl _apic_hwint06
+.globl _apic_hwint07
+.globl _apic_hwint08
+.globl _apic_hwint09
+.globl _apic_hwint10
+.globl _apic_hwint11
+.globl _apic_hwint12
+.globl _apic_hwint13
+.globl _apic_hwint14
+.globl _apic_hwint15
.text
#define APIC_IRQ_HANDLER(irq) \
push $irq ;\
- call irq_handle /* intr_handle(irq_handlers[irq]) */ ;\
+ call _irq_handle /* intr_handle(irq_handlers[irq]) */ ;\
add $4, %esp ;\
- mov lapic_eoi_addr, %eax ;\
+ mov _lapic_eoi_addr, %eax ;\
movl $0, (%eax) ;\
/*===========================================================================*/
\
SAVE_PROCESS_CTX(0) ;\
push %ebp ;\
- call context_stop ;\
+ call _context_stop ;\
add $4, %esp ;\
movl $0, %ebp /* for stack trace */ ;\
APIC_IRQ_HANDLER(irq) ;\
- jmp switch_to_user ;\
+ jmp _switch_to_user ;\
\
0: \
pusha ;\
- call context_stop_idle ;\
+ call _context_stop_idle ;\
APIC_IRQ_HANDLER(irq) ;\
CLEAR_IF(10*4(%esp)) ;\
popa ;\
/* Each of these entry points is an expansion of the hwint_master macro */
.balign 16
-apic_hwint00:
+_apic_hwint00:
/* Interrupt routine for irq 0 (the clock). */
apic_hwint(0)
.balign 16
-apic_hwint01:
+_apic_hwint01:
/* Interrupt routine for irq 1 (keyboard) */
apic_hwint(1)
.balign 16
-apic_hwint02:
+_apic_hwint02:
/* Interrupt routine for irq 2 (cascade!) */
apic_hwint(2)
.balign 16
-apic_hwint03:
+_apic_hwint03:
/* Interrupt routine for irq 3 (second serial) */
apic_hwint(3)
.balign 16
-apic_hwint04:
+_apic_hwint04:
/* Interrupt routine for irq 4 (first serial) */
apic_hwint(4)
.balign 16
-apic_hwint05:
+_apic_hwint05:
/* Interrupt routine for irq 5 (XT winchester) */
apic_hwint(5)
.balign 16
-apic_hwint06:
+_apic_hwint06:
/* Interrupt routine for irq 6 (floppy) */
apic_hwint(6)
.balign 16
-apic_hwint07:
+_apic_hwint07:
/* Interrupt routine for irq 7 (printer) */
apic_hwint(7)
.balign 16
-apic_hwint08:
+_apic_hwint08:
/* Interrupt routine for irq 8 (realtime clock) */
apic_hwint(8)
.balign 16
-apic_hwint09:
+_apic_hwint09:
/* Interrupt routine for irq 9 (irq 2 redirected) */
apic_hwint(9)
.balign 16
-apic_hwint10:
+_apic_hwint10:
/* Interrupt routine for irq 10 */
apic_hwint(10)
.balign 16
-apic_hwint11:
+_apic_hwint11:
/* Interrupt routine for irq 11 */
apic_hwint(11)
.balign 16
-apic_hwint12:
+_apic_hwint12:
/* Interrupt routine for irq 12 */
apic_hwint(12)
.balign 16
-apic_hwint13:
+_apic_hwint13:
/* Interrupt routine for irq 13 (FPU exception) */
apic_hwint(13)
.balign 16
-apic_hwint14:
+_apic_hwint14:
/* Interrupt routine for irq 14 (AT winchester) */
apic_hwint(14)
.balign 16
-apic_hwint15:
+_apic_hwint15:
/* Interrupt routine for irq 15 */
apic_hwint(15)
#define LAPIC_INTR_HANDLER(func) \
movl $func, %eax ;\
call *%eax /* call the actual handler */ ;\
- mov lapic_eoi_addr, %eax /* the end of handler*/ ;\
+ mov _lapic_eoi_addr, %eax /* the end of handler*/ ;\
movl $0, (%eax) ;
/*===========================================================================*/
\
SAVE_PROCESS_CTX(0) ;\
push %ebp ;\
- call context_stop ;\
+ call _context_stop ;\
add $4, %esp ;\
movl $0, %ebp /* for stack trace */ ;\
LAPIC_INTR_HANDLER(func) ;\
- jmp switch_to_user ;\
+ jmp _switch_to_user ;\
\
0: \
pusha ;\
- call context_stop_idle ;\
+ call _context_stop_idle ;\
LAPIC_INTR_HANDLER(func) ;\
CLEAR_IF(10*4(%esp)) ;\
popa ;\
iret ;
/* apic timer tick handlers */
-.globl lapic_bsp_timer_int_handler
-lapic_bsp_timer_int_handler:
- lapic_intr(bsp_timer_int_handler)
+.globl _lapic_bsp_timer_int_handler
+_lapic_bsp_timer_int_handler:
+ lapic_intr(_bsp_timer_int_handler)
-.globl lapic_ap_timer_int_handler
-lapic_ap_timer_int_handler:
- lapic_intr(ap_timer_int_handler)
+.globl _lapic_ap_timer_int_handler
+_lapic_ap_timer_int_handler:
+ lapic_intr(_ap_timer_int_handler)
#ifdef CONFIG_APIC_DEBUG
#define lapic_intr_dummy_handler(vect) \
pushl $vect; \
push $lapic_intr_dummy_handler_msg; \
- call printf; \
+ call _printf; \
1: jmp 1b; /* never return */
#define LAPIC_INTR_DUMMY_HANDLER(vect) \
.balign LAPIC_INTR_DUMMY_HANDLER_SIZE; \
lapic_intr_dummy_handler_##vect: lapic_intr_dummy_handler(vect)
-.globl lapic_intr_dummy_handles_start
-lapic_intr_dummy_handles_start:
+.globl _lapic_intr_dummy_handles_start
+_lapic_intr_dummy_handles_start:
LAPIC_INTR_DUMMY_HANDLER(0)
LAPIC_INTR_DUMMY_HANDLER(1)
LAPIC_INTR_DUMMY_HANDLER(254)
LAPIC_INTR_DUMMY_HANDLER(255)
-.globl lapic_intr_dummy_handles_end
-lapic_intr_dummy_handles_end:
+.globl _lapic_intr_dummy_handles_end
+_lapic_intr_dummy_handles_end:
#endif /* CONFIG_APIC_DEBUG */
.text
#define LD_ST_REG(reg) ;\
-.globl ld_##reg ;\
-.globl st_##reg ;\
+.globl _ld_##reg ;\
+.globl _st_##reg ;\
;\
-ld_##reg: ;\
+_ld_##reg: ;\
mov 4(%esp), %eax ;\
mov %eax, %reg ;\
ret ;\
;\
-st_##reg: ;\
+_st_##reg: ;\
mov %reg, %eax ;\
ret
--- /dev/null
+OUTPUT_ARCH("i386")
+ENTRY(MINIX)
+SECTIONS
+{
+ . = 0x0;
+ _text = .;
+ begtext = .;
+ .text.head . : AT (0x0) {
+ *(.text.head)
+ }
+ .text . : AT (ADDR(.text) - 0x0000) {
+ *(.text)
+ *(.text.*)
+ . = ALIGN(4096);
+ }
+ _etext = .;
+ etext = .;
+
+ _data = .;
+ begdata = .;
+ .data . : AT (ADDR(.data) - 0x0000) {
+ _rodata = .;
+ /* kernel data starts with this magic number */
+ SHORT(0x526f);
+ *(.rodata)
+ *(.rodata.*)
+ _erodata = .;
+ *(.data)
+ *(.data.*)
+ }
+ _edata = .;
+ _bss = .;
+ begbss = .;
+ .bss . : AT (ADDR(.bss) - 0x0000) {
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ }
+ _ebss = .;
+ endbss = .;
+ _end = .;
+ end = .;
+
+ /DISCARD/ :
+ {
+ *(.eh_frame)
+ *(.comment)
+ *(.comment.*)
+ *(.note)
+ *(.note.*)
+ }
+}
* kernel. They are:
*/
-.globl monitor /* exit Minix and return to the monitor */
-.globl int86 /* let the monitor make an 8086 interrupt call */
-.globl exit /* dummy for library routines */
+.globl _monitor/* exit Minix and return to the monitor */
+.globl _int86 /* let the monitor make an 8086 interrupt call */
+#ifdef __ACK__
.globl _exit /* dummy for library routines */
.globl __exit /* dummy for library routines */
-.globl __main /* dummy for GCC */
-.globl phys_insw /* transfer data from (disk controller) port to memory */
-.globl phys_insb /* likewise byte by byte */
-.globl phys_outsw /* transfer data from memory to (disk controller) port */
-.globl phys_outsb /* likewise byte by byte */
-.globl phys_copy /* copy data from anywhere to anywhere in memory */
-.globl phys_copy_fault /* phys_copy pagefault */
-.globl phys_copy_fault_in_kernel /* phys_copy pagefault in kernel */
-.globl phys_memset /* write pattern anywhere in memory */
+.globl ___exit /* dummy for library routines */
+#endif
+.globl ___main /* dummy for GCC */
+.globl _phys_insw /* transfer data from (disk controller) port to memory */
+.globl _phys_insb /* likewise byte by byte */
+.globl _phys_outsw /* transfer data from memory to (disk controller) port */
+.globl _phys_outsb /* likewise byte by byte */
+.globl _phys_copy /* copy data from anywhere to anywhere in memory */
+.globl _phys_copy_fault /* phys_copy pagefault */
+.globl _phys_copy_fault_in_kernel /* phys_copy pagefault in kernel */
+.globl _phys_memset /* write pattern anywhere in memory */
.globl mem_rdw /* copy one word from [segment:offset] */
-.globl reset /* reset the system */
-.globl halt_cpu/* halts the current cpu when idle */
-.globl read_cpu_flags /* read the cpu flags */
-.globl read_cr0 /* read cr0 */
-.globl read_cr2 /* read cr2 */
-.globl getcr3val
-.globl write_cr0 /* write a value in cr0 */
-.globl read_cr3
-.globl read_cr4
-.globl write_cr4
-
-.globl catch_pagefaults
-.globl read_ds
-.globl read_cs
-.globl read_ss
-.globl idt_reload /* reload idt when returning to monitor. */
-
-.globl fninit /* non-waiting FPU initialization */
-.globl fnstsw /* store status word (non-waiting) */
-.globl fnstcw /* store control word (non-waiting) */
+.globl _reset /* reset the system */
+.globl _halt_cpu/* halts the current cpu when idle */
+.globl _read_cpu_flags /* read the cpu flags */
+.globl _read_cr0 /* read cr0 */
+.globl _read_cr2 /* read cr2 */
+.globl _getcr3val
+.globl _write_cr0 /* write a value in cr0 */
+.globl _read_cr3
+.globl _read_cr4
+.globl _write_cr4
+
+.globl _catch_pagefaults
+.globl _read_ds
+.globl _read_cs
+.globl _read_ss
+.globl _idt_reload /* reload idt when returning to monitor. */
+
+.globl _fninit /* non-waiting FPU initialization */
+.globl _fnstsw /* store status word (non-waiting) */
+.globl _fnstcw /* store control word (non-waiting) */
/*
* The routines only guarantee to preserve the registers the C compiler
/* PUBLIC void monitor(); */
/* Return to the monitor. */
-monitor:
- movl mon_sp, %esp /* restore monitor stack pointer */
+_monitor:
+ movl _mon_sp, %esp /* restore monitor stack pointer */
movw $SS_SELECTOR, %dx /* monitor data segment */
mov %dx, %ds
mov %dx, %es
/* int86 */
/*===========================================================================*/
/* PUBLIC void int86(); */
-int86:
- cmpb $0, mon_return /* is the monitor there? */
+_int86:
+ cmpb $0, _mon_return /* is the monitor there? */
jne 0f
movb $0x01, %ah /* an int 13 error seems appropriate */
- movb %ah, reg86+0 /* reg86.w.f = 1 (set carry flag) */
- movb %ah, reg86+13 /* reg86.b.ah = 0x01 = "invalid command" */
+ movb %ah, _reg86+0 /* reg86.w.f = 1 (set carry flag) */
+ movb %ah, _reg86+13 /* reg86.b.ah = 0x01 = "invalid command" */
ret
0:
push %ebp /* save C registers */
movb %al, %ah
inb $INT_CTLMASK
push %eax /* save interrupt masks */
- movl irq_use, %eax /* map of in-use IRQ's */
+ movl _irq_use, %eax /* map of in-use IRQ's */
and $~(1<<CLOCK_IRQ), %eax /* keep the clock ticking */
outb $INT_CTLMASK /* enable all unused IRQ's and vv. */
movb %ah, %al
mov $SS_SELECTOR, %eax /* monitor data segment */
mov %ax, %ss
- xchgl mon_sp, %esp /* switch stacks */
- push reg86+36 /* parameters used in INT call */
- push reg86+32
- push reg86+28
- push reg86+24
- push reg86+20
- push reg86+16
- push reg86+12
- push reg86+8
- push reg86+4
- push reg86+0
+ xchgl _mon_sp, %esp /* switch stacks */
+ push _reg86+36 /* parameters used in INT call */
+ push _reg86+32
+ push _reg86+28
+ push _reg86+24
+ push _reg86+20
+ push _reg86+16
+ push _reg86+12
+ push _reg86+8
+ push _reg86+4
+ push _reg86+0
mov %ax, %ds /* remaining data selectors */
mov %ax, %es
mov %ax, %fs
push $return /* kernel return address and selector */
ljmpw *20+2*4+10*4+2*4(%esp)
return:
- pop reg86+0
- pop reg86+4
- pop reg86+8
- pop reg86+12
- pop reg86+16
- pop reg86+20
- pop reg86+24
- pop reg86+28
- pop reg86+32
- pop reg86+36
- lgdt gdt+GDT_SELECTOR /* reload global descriptor table */
+ pop _reg86+0
+ pop _reg86+4
+ pop _reg86+8
+ pop _reg86+12
+ pop _reg86+16
+ pop _reg86+20
+ pop _reg86+24
+ pop _reg86+28
+ pop _reg86+32
+ pop _reg86+36
+ lgdt _gdt+GDT_SELECTOR /* reload global descriptor table */
ljmp $CS_SELECTOR, $csinit
csinit:
mov $DS_SELECTOR, %eax
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
- xchgl mon_sp, %esp /* unswitch stacks */
- lidt gdt+IDT_SELECTOR /* reload interrupt descriptor table */
+ xchgl _mon_sp, %esp /* unswitch stacks */
+ lidt _gdt+IDT_SELECTOR /* reload interrupt descriptor table */
#ifdef CONFIG_APIC
cmpl $0x0, lapic_addr
shl $3, %eax
mov %eax, %ebx
add $TSS_SELECTOR, %eax
- addl gdt+DESC_ACCESS, %eax
+ addl _gdt+DESC_ACCESS, %eax
and $~0x02, %eax
ltr %bx /* set TSS register */
outb $INT2_CTLMASK
6:
- addl %ecx, lost_ticks /* record lost clock ticks */
+ addl %ecx, _lost_ticks /* record lost clock ticks */
popf /* restore flags */
pop %ebx /* restore C registers */
* Actual calls to exit cannot occur in the kernel.
* GNU CC likes to call ___main from main() for nonobvious reasons.
*/
-
-exit:
+#ifdef __ACK__
_exit:
__exit:
+___exit:
sti
- jmp __exit
+ jmp ___exit
+#endif
-__main:
+___main:
ret
* Input an array from an I/O port. Absolute address version of insw().
*/
-phys_insw:
+_phys_insw:
push %ebp
mov %esp, %ebp
cld
* Input an array from an I/O port. Absolute address version of insb().
*/
-phys_insb:
+_phys_insb:
push %ebp
mov %esp, %ebp
cld
*/
.balign 16
-phys_outsw:
+_phys_outsw:
push %ebp
mov %esp, %ebp
cld
*/
.balign 16
-phys_outsb:
+_phys_outsb:
push %ebp
mov %esp, %ebp
cld
/* es edi esi eip src dst len */
.balign 16
-phys_copy:
+_phys_copy:
cld
push %esi
push %edi
rep movsb %es:(%esi), %es:(%edi)
mov $0, %eax /* 0 means: no fault */
-phys_copy_fault: /* kernel can send us here */
+_phys_copy_fault: /* kernel can send us here */
pop %es
pop %edi
pop %esi
ret
-phys_copy_fault_in_kernel: /* kernel can send us here */
+_phys_copy_fault_in_kernel: /* kernel can send us here */
pop %es
pop %edi
pop %esi
*/
.balign 16
-.globl copy_msg_from_user
-copy_msg_from_user:
+.globl _copy_msg_from_user
+_copy_msg_from_user:
push %gs
mov 8(%esp), %eax
mov %gs:8*4(%ecx), %eax
mov %eax, 8*4(%edx)
-.globl __copy_msg_from_user_end
-__copy_msg_from_user_end:
+.globl ___copy_msg_from_user_end
+___copy_msg_from_user_end:
pop %gs
*/
.balign 16
-.globl copy_msg_to_user
-copy_msg_to_user:
+.globl _copy_msg_to_user
+_copy_msg_to_user:
push %gs
mov 8(%esp), %eax
mov 8*4(%ecx), %eax
mov %eax, %gs:8*4(%edx)
-.globl __copy_msg_to_user_end
-__copy_msg_to_user_end:
+.globl ___copy_msg_to_user_end
+___copy_msg_to_user_end:
pop %gs
* here to continue, clean up and report the error
*/
.balign 16
-.globl __user_copy_msg_pointer_failure
-__user_copy_msg_pointer_failure:
+.globl ___user_copy_msg_pointer_failure
+___user_copy_msg_pointer_failure:
pop %gs
movl $-1, %eax
*/
.balign 16
-phys_memset:
+_phys_memset:
push %ebp
mov %esp, %ebp
push %esi
* Reset the system by loading IDT with offset 0 and interrupting.
*/
-reset:
+_reset:
lidt idt_zero
int $3 /* anything goes, the 386 will not like it */
.data
* reanables interrupts and puts the cpu in the halts state. Once an interrupt
* is handled the execution resumes by disabling interrupts and continues
*/
-halt_cpu:
+_halt_cpu:
sti
hlt /* interrupts enabled only after this instruction is executed! */
/*
* Read CPU status flags from C.
*/
.balign 16
-read_cpu_flags:
+_read_cpu_flags:
pushf
mov (%esp), %eax
add $4, %esp
ret
-read_ds:
+_read_ds:
mov $0, %eax
mov %ds, %ax
ret
-read_cs:
+_read_cs:
mov $0, %eax
mov %cs, %ax
ret
-read_ss:
+_read_ss:
mov $0, %eax
mov %ss, %ax
ret
/*===========================================================================*/
/* fpu_routines */
/*===========================================================================*/
-fninit:
+_fninit:
fninit
ret
-fnstsw:
+_fnstsw:
xor %eax, %eax
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
fnstsw %ax
ret
-fnstcw:
+_fnstcw:
push %eax
mov 8(%esp), %eax
/* read_cr0 */
/*===========================================================================*/
/* PUBLIC unsigned long read_cr0(void); */
-read_cr0:
+_read_cr0:
push %ebp
mov %esp, %ebp
mov %cr0, %eax
/* write_cr0 */
/*===========================================================================*/
/* PUBLIC void write_cr0(unsigned long value); */
-write_cr0:
+_write_cr0:
push %ebp
mov %esp, %ebp
mov 8(%ebp), %eax
/* read_cr2 */
/*===========================================================================*/
/* PUBLIC reg_t read_cr2(void); */
-read_cr2:
+_read_cr2:
mov %cr2, %eax
ret
/* read_cr3 */
/*===========================================================================*/
/* PUBLIC unsigned long read_cr3(void); */
-read_cr3:
+_read_cr3:
push %ebp
mov %esp, %ebp
/* read_cr4 */
/*===========================================================================*/
/* PUBLIC unsigned long read_cr4(void); */
-read_cr4:
+_read_cr4:
push %ebp
mov %esp, %ebp
/* write_cr4 */
/*===========================================================================*/
/* PUBLIC void write_cr4(unsigned long value); */
-write_cr4:
+_write_cr4:
push %ebp
mov %esp, %ebp
mov 8(%ebp), %eax
/* getcr3val */
/*===========================================================================*/
/* PUBLIC unsigned long getcr3val(void); */
-getcr3val:
+_getcr3val:
mov %cr3, %eax
ret
*
* void ia32_msr_read(u32_t reg, u32_t * hi, u32_t * lo)
*/
-.globl ia32_msr_read
-ia32_msr_read:
+.globl _ia32_msr_read
+_ia32_msr_read:
push %ebp
mov %esp, %ebp
*
* void ia32_msr_write(u32_t reg, u32_t hi, u32_t lo)
*/
-.globl ia32_msr_write
-ia32_msr_write:
+.globl _ia32_msr_write
+_ia32_msr_write:
push %ebp
mov %esp, %ebp
/*===========================================================================*/
/* PUBLIC void idt_reload (void); */
.balign 16
-idt_reload:
- lidt gdt+IDT_SELECTOR /* reload interrupt descriptor table */
+_idt_reload:
+ lidt _gdt+IDT_SELECTOR /* reload interrupt descriptor table */
ret
/*
mov reg, %ax ;\
mov %ax, reg ;
-.globl reload_ds
-reload_ds:
+.globl _reload_ds
+_reload_ds:
RELOAD_SEG_REG(%ds)
ret
* not desirable
*/
.balign 16
-.globl switch_address_space
-switch_address_space:
+.globl _switch_address_space
+_switch_address_space:
/* read the process pointer */
mov 4(%esp), %edx
cmp %ecx, %eax
je 0f
mov %eax, %cr3
- mov %edx, ptproc
+ mov %edx, _ptproc
0:
ret
* the entity.
*/
-.globl restore_user_context
-.globl reload_cr3
-
-.globl divide_error
-.globl single_step_exception
-.globl nmi
-.globl breakpoint_exception
-.globl overflow
-.globl bounds_check
-.globl inval_opcode
-.globl copr_not_available
-.globl double_fault
-.globl copr_seg_overrun
-.globl inval_tss
-.globl segment_not_present
-.globl stack_exception
-.globl general_protection
-.globl page_fault
-.globl copr_error
-.globl alignment_check
-.globl machine_check
-.globl simd_exception
-.globl params_size
-.globl params_offset
-.globl mon_ds
-.globl switch_to_user
-.globl lazy_fpu
-
-.globl hwint00 /* handlers for hardware interrupts */
-.globl hwint01
-.globl hwint02
-.globl hwint03
-.globl hwint04
-.globl hwint05
-.globl hwint06
-.globl hwint07
-.globl hwint08
-.globl hwint09
-.globl hwint10
-.globl hwint11
-.globl hwint12
-.globl hwint13
-.globl hwint14
-.globl hwint15
+.globl _restore_user_context
+.globl _reload_cr3
+
+.globl _divide_error
+.globl _single_step_exception
+.globl _nmi
+.globl _breakpoint_exception
+.globl _overflow
+.globl _bounds_check
+.globl _inval_opcode
+.globl _copr_not_available
+.globl _double_fault
+.globl _copr_seg_overrun
+.globl _inval_tss
+.globl _segment_not_present
+.globl _stack_exception
+.globl _general_protection
+.globl _page_fault
+.globl _copr_error
+.globl _alignment_check
+.globl _machine_check
+.globl _simd_exception
+.globl _params_size
+.globl _params_offset
+.globl _mon_ds
+.globl _switch_to_user
+.globl _lazy_fpu
+
+.globl _hwint00 /* handlers for hardware interrupts */
+.globl _hwint01
+.globl _hwint02
+.globl _hwint03
+.globl _hwint04
+.globl _hwint05
+.globl _hwint06
+.globl _hwint07
+.globl _hwint08
+.globl _hwint09
+.globl _hwint10
+.globl _hwint11
+.globl _hwint12
+.globl _hwint13
+.globl _hwint14
+.globl _hwint15
/* Exported variables. */
.globl begbss
push %edi
cmp $0, 4(%ebp) /* monitor return vector is */
je noret /* nonzero if return possible */
- incl mon_return
+ incl _mon_return
noret:
- movl %esp, mon_sp /* save stack pointer for later return */
+ movl %esp, _mon_sp /* save stack pointer for later return */
/* Copy the monitor global descriptor table to the address space of kernel and */
/* switch over to it. Prot_init() can then update it with immediate effect. */
- sgdt gdt+GDT_SELECTOR /* get the monitor gdtr */
- movl gdt+GDT_SELECTOR+2, %esi /* absolute address of GDT */
- mov $gdt, %ebx /* address of kernel GDT */
+ sgdt _gdt+GDT_SELECTOR /* get the monitor gdtr */
+ movl _gdt+GDT_SELECTOR+2, %esi /* absolute address of GDT */
+ mov $_gdt, %ebx /* address of kernel GDT */
mov $8*8, %ecx /* copying eight descriptors */
copygdt:
movb %es:(%esi), %al
inc %esi
inc %ebx
loop copygdt
- movl gdt+DS_SELECTOR+2, %eax /* base of kernel data */
+ movl _gdt+DS_SELECTOR+2, %eax /* base of kernel data */
and $0x00FFFFFF, %eax /* only 24 bits */
- add $gdt, %eax /* eax = vir2phys(gdt) */
- movl %eax, gdt+GDT_SELECTOR+2 /* set base of GDT */
- lgdt gdt+GDT_SELECTOR /* switch over to kernel GDT */
+ add $_gdt, %eax /* eax = vir2phys(gdt) */
+ movl %eax, _gdt+GDT_SELECTOR+2 /* set base of GDT */
+ lgdt _gdt+GDT_SELECTOR /* switch over to kernel GDT */
/* Locate boot parameters, set up kernel segment registers and stack. */
mov 8(%ebp), %ebx /* boot parameters offset */
mov 12(%ebp), %edx /* boot parameters length */
mov 16(%ebp), %eax /* address of a.out headers */
- movl %eax, aout
+ movl %eax, _aout
mov %ds, %ax /* kernel data */
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
- mov $k_boot_stktop, %esp /* set sp to point to the top of kernel stack */
+ mov $_k_boot_stktop, %esp /* set sp to point to the top of kernel stack */
/* Save boot parameters into these global variables for i386 code */
- movl %edx, params_size
- movl %ebx, params_offset
- movl $SS_SELECTOR, mon_ds
+ movl %edx, _params_size
+ movl %ebx, _params_offset
+ movl $SS_SELECTOR, _mon_ds
/* Call C startup code to set up a proper environment to run main(). */
push %edx
push $SS_SELECTOR
push $DS_SELECTOR
push $CS_SELECTOR
- call cstart /* cstart(cs, ds, mds, parmoff, parmlen) */
+ call _cstart /* cstart(cs, ds, mds, parmoff, parmlen) */
add $5*4, %esp
/* Reload gdtr, idtr and the segment registers to global descriptor table set */
/* up by prot_init(). */
- lgdt gdt+GDT_SELECTOR
- lidt gdt+IDT_SELECTOR
+ lgdt _gdt+GDT_SELECTOR
+ lidt _gdt+IDT_SELECTOR
ljmp $CS_SELECTOR, $csinit
csinit:
ltr %ax
push $0 /* set flags to known good state */
popf /* esp, clear nested task and int enable */
- jmp main /* main() */
+ jmp _main /* main() */
/*===========================================================================*/
#define PIC_IRQ_HANDLER(irq) \
push $irq ;\
- call irq_handle /* intr_handle(irq_handlers[irq]) */ ;\
+ call _irq_handle /* intr_handle(irq_handlers[irq]) */ ;\
add $4, %esp ;
/*===========================================================================*/
\
SAVE_PROCESS_CTX(0) ;\
push %ebp ;\
- call context_stop ;\
+ call _context_stop ;\
add $4, %esp ;\
movl $0, %ebp /* for stack trace */ ;\
PIC_IRQ_HANDLER(irq) ;\
movb $END_OF_INT, %al ;\
outb $INT_CTL /* reenable interrupts in master pic */ ;\
- jmp switch_to_user ;\
+ jmp _switch_to_user ;\
\
0: \
pusha ;\
- call context_stop_idle ;\
+ call _context_stop_idle ;\
PIC_IRQ_HANDLER(irq) ;\
movb $END_OF_INT, %al ;\
outb $INT_CTL /* reenable interrupts in master pic */ ;\
/* Each of these entry points is an expansion of the hwint_master macro */
.balign 16
-hwint00:
+_hwint00:
/* Interrupt routine for irq 0 (the clock). */
hwint_master(0)
.balign 16
-hwint01:
+_hwint01:
/* Interrupt routine for irq 1 (keyboard) */
hwint_master(1)
.balign 16
-hwint02:
+_hwint02:
/* Interrupt routine for irq 2 (cascade!) */
hwint_master(2)
.balign 16
-hwint03:
+_hwint03:
/* Interrupt routine for irq 3 (second serial) */
hwint_master(3)
.balign 16
-hwint04:
+_hwint04:
/* Interrupt routine for irq 4 (first serial) */
hwint_master(4)
.balign 16
-hwint05:
+_hwint05:
/* Interrupt routine for irq 5 (XT winchester) */
hwint_master(5)
.balign 16
-hwint06:
+_hwint06:
/* Interrupt routine for irq 6 (floppy) */
hwint_master(6)
.balign 16
-hwint07:
+_hwint07:
/* Interrupt routine for irq 7 (printer) */
hwint_master(7)
\
SAVE_PROCESS_CTX(0) ;\
push %ebp ;\
- call context_stop ;\
+ call _context_stop ;\
add $4, %esp ;\
movl $0, %ebp /* for stack trace */ ;\
PIC_IRQ_HANDLER(irq) ;\
movb $END_OF_INT, %al ;\
outb $INT_CTL /* reenable interrupts in master pic */ ;\
outb $INT2_CTL /* reenable slave 8259 */ ;\
- jmp switch_to_user ;\
+ jmp _switch_to_user ;\
\
0: \
pusha ;\
- call context_stop_idle ;\
+ call _context_stop_idle ;\
PIC_IRQ_HANDLER(irq) ;\
movb $END_OF_INT, %al ;\
outb $INT_CTL /* reenable interrupts in master pic */ ;\
/* Each of these entry points is an expansion of the hwint_slave macro */
.balign 16
-hwint08:
+_hwint08:
/* Interrupt routine for irq 8 (realtime clock) */
hwint_slave(8)
.balign 16
-hwint09:
+_hwint09:
/* Interrupt routine for irq 9 (irq 2 redirected) */
hwint_slave(9)
.balign 16
-hwint10:
+_hwint10:
/* Interrupt routine for irq 10 */
hwint_slave(10)
.balign 16
-hwint11:
+_hwint11:
/* Interrupt routine for irq 11 */
hwint_slave(11)
.balign 16
-hwint12:
+_hwint12:
/* Interrupt routine for irq 12 */
hwint_slave(12)
.balign 16
-hwint13:
+_hwint13:
/* Interrupt routine for irq 13 (FPU exception) */
hwint_slave(13)
.balign 16
-hwint14:
+_hwint14:
/* Interrupt routine for irq 14 (AT winchester) */
hwint_slave(14)
.balign 16
-hwint15:
+_hwint15:
/* Interrupt routine for irq 15 */
hwint_slave(15)
* IPC is only from a process to kernel
*/
.balign 16
-.globl ipc_entry
-ipc_entry:
+.globl _ipc_entry
+_ipc_entry:
SAVE_PROCESS_CTX(0)
/* stop user process cycles */
push %ebp
- call context_stop
+ call _context_stop
add $4, %esp
/* for stack trace */
movl $0, %ebp
- call do_ipc
+ call _do_ipc
/* restore the current process pointer and save the return value */
add $3 * 4, %esp
pop %esi
mov %eax, AXREG(%esi)
- jmp switch_to_user
+ jmp _switch_to_user
/*
* kernel call is only from a process to kernel
*/
.balign 16
-.globl kernel_call_entry
-kernel_call_entry:
+.globl _kernel_call_entry
+_kernel_call_entry:
SAVE_PROCESS_CTX(0)
/* stop user process cycles */
push %ebp
- call context_stop
+ call _context_stop
add $4, %esp
/* for stack trace */
movl $0, %ebp
- call kernel_call
+ call _kernel_call
/* restore the current process pointer and save the return value */
add $8, %esp
- jmp switch_to_user
+ jmp _switch_to_user
.balign 16
/* stop user process cycles */
push %ebp
- call context_stop
+ call _context_stop
add $4, %esp
/* for stack trace clear %ebp */
*/
push %esp
push $0 /* it's not a nested exception */
- call exception_handler
+ call _exception_handler
- jmp switch_to_user
+ jmp _switch_to_user
exception_entry_nested:
add $(8 * 4), %eax
push %eax
pushl $1 /* it's a nested exception */
- call exception_handler
+ call _exception_handler
add $8, %esp
popa
/*===========================================================================*/
/* restart */
/*===========================================================================*/
-restore_user_context:
+_restore_user_context:
mov 4(%esp), %ebp /* will assume P_STACKBASE == 0 */
/* reconstruct the stack for iret */
pushl $0 ;\
EXCEPTION_ERR_CODE(vector)
-divide_error:
+_divide_error:
EXCEPTION_NO_ERR_CODE(DIVIDE_VECTOR)
-single_step_exception:
+_single_step_exception:
EXCEPTION_NO_ERR_CODE(DEBUG_VECTOR)
-nmi:
+_nmi:
#ifndef CONFIG_WATCHDOG
EXCEPTION_NO_ERR_CODE(NMI_VECTOR)
#else
mov %si, %es
push %esp
- call nmi_watchdog_handler
+ call _nmi_watchdog_handler
add $4, %esp
/* restore all the important registers as they were before the trap */
iret
#endif
-breakpoint_exception:
+_breakpoint_exception:
EXCEPTION_NO_ERR_CODE(BREAKPOINT_VECTOR)
-overflow:
+_overflow:
EXCEPTION_NO_ERR_CODE(OVERFLOW_VECTOR)
-bounds_check:
+_bounds_check:
EXCEPTION_NO_ERR_CODE(BOUNDS_VECTOR)
-inval_opcode:
+_inval_opcode:
EXCEPTION_NO_ERR_CODE(INVAL_OP_VECTOR)
-copr_not_available:
+_copr_not_available:
TEST_INT_IN_KERNEL(4, copr_not_available_in_kernel)
clts
cld /* set direction flag to a known value */
SAVE_PROCESS_CTX_NON_LAZY(0)
/* stop user process cycles */
push %ebp
- call context_stop
+ call _context_stop
pop %ebp
lea P_MISC_FLAGS(%ebp), %ebx
movw (%ebx), %cx
jmp copr_return
0: /* load FPU context for current process */
mov %ss:FP_SAVE_AREA_P(%ebp), %eax
- cmp $0, osfxsr_feature
+ cmp $0, _osfxsr_feature
jz fp_l_no_fxsr /* FXSR is not avaible. */
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
frstor (%eax)
copr_return:
orw $MF_USED_FPU, (%ebx) /* fpu was used during last execution */
- jmp switch_to_user
+ jmp _switch_to_user
copr_not_available_in_kernel:
movl $0, (%esp)
- call panic
+ call _panic
-double_fault:
+_double_fault:
EXCEPTION_ERR_CODE(DOUBLE_FAULT_VECTOR)
-copr_seg_overrun:
+_copr_seg_overrun:
EXCEPTION_NO_ERR_CODE(COPROC_SEG_VECTOR)
-inval_tss:
+_inval_tss:
EXCEPTION_ERR_CODE(INVAL_TSS_VECTOR)
-segment_not_present:
+_segment_not_present:
EXCEPTION_ERR_CODE(SEG_NOT_VECTOR)
-stack_exception:
+_stack_exception:
EXCEPTION_ERR_CODE(STACK_FAULT_VECTOR)
-general_protection:
+_general_protection:
EXCEPTION_ERR_CODE(PROTECTION_VECTOR)
-page_fault:
+_page_fault:
EXCEPTION_ERR_CODE(PAGE_FAULT_VECTOR)
-copr_error:
+_copr_error:
EXCEPTION_NO_ERR_CODE(COPROC_ERR_VECTOR)
-alignment_check:
+_alignment_check:
EXCEPTION_NO_ERR_CODE(ALIGNMENT_CHECK_VECTOR)
-machine_check:
+_machine_check:
EXCEPTION_NO_ERR_CODE(MACHINE_CHECK_VECTOR)
-simd_exception:
+_simd_exception:
EXCEPTION_NO_ERR_CODE(SIMD_EXCEPTION_VECTOR)
/*===========================================================================*/
* Actualy lazy code is just few lines, which check MF_USED_FPU,
* another part is save_init_fpu().
*/
-lazy_fpu:
+_lazy_fpu:
push %ebp
mov %esp, %ebp
push %eax
push %ebx
push %ecx
- cmp $0, fpu_presence /* Do we have FPU? */
+ cmp $0, _fpu_presence /* Do we have FPU? */
jz no_fpu_available
mov 8(%ebp), %eax /* Get pptr */
lea P_MISC_FLAGS(%eax), %ebx
and $MF_USED_FPU, %cx
jz 0f /* Don't save FPU */
mov %ss:FP_SAVE_AREA_P(%eax), %eax
- cmp $0, osfxsr_feature
+ cmp $0, _osfxsr_feature
jz fp_s_no_fxsr /* FXSR is not avaible. */
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
/* reload_cr3 */
/*===========================================================================*/
/* PUBLIC void reload_cr3(void); */
-reload_cr3:
+_reload_cr3:
push %ebp
mov %esp, %ebp
mov %cr3, %eax
/*
* the kernel stack
*/
-.globl k_boot_stktop
-k_boot_stack:
+.globl _k_boot_stktop
+_k_boot_stack:
.space 4096 /* kernel stack */ /* FIXME use macro here */
-k_boot_stktop: /* top of kernel stack */
+_k_boot_stktop: /* top of kernel stack */
#define SAVE_PROCESS_CTX(displ) \
SAVE_PROCESS_CTX_NON_LAZY(displ) ;\
push %ebp ;\
- call lazy_fpu ;\
+ call _lazy_fpu ;\
add $4, %esp ;
/*
# Makefile for liby
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -wo
+CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
LIB= y
#!/bin/sh
-export COMPILER_TYPE=ack
-export ARCH=i386
-
-if [ "$COMPILER_TYPE" = 'ack' ]; then
- export CC=cc
- export MAKEOBJDIR=obj-ack
-elif [ "$COMPILER_TYPE" = 'gnu' ]; then
- export CC=gcc
- export AR=gar
- export MAKEOBJDIR=obj-gnu
- export PATH=$PATH:/usr/gnu/bin
-fi
+export CC=cc
+export MAKEOBJDIR=obj-ack
make $@
#!/bin/sh
-export COMPILER_TYPE=gnu
-export ARCH=i386
-
-if [ "$COMPILER_TYPE" = 'ack' ]; then
- export CC=cc
- export MAKEOBJDIR=obj-ack
-elif [ "$COMPILER_TYPE" = 'gnu' ]; then
- export CC=gcc
- export AR=gar
- export MAKEOBJDIR=obj-gnu
- export PATH=$PATH:/usr/gnu/bin
-fi
+export CC=gcc
+export MAKEOBJDIR=obj-gnu
+export PATH=$PATH:/usr/gnu/bin
make $@
DEFS=-DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT \
-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE ${DEFS} -wo
+CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE ${DEFS}
SRCS= editline.c complete.c sysunix.c
BINDIR?= /usr/sbin
INSTALLFLAGS+= -S 1050k
-CPPFLAGS= -I${MINIXSRCDIR}
+CPPFLAGS+= -I${MINIXSRCDIR}
SUBDIR= service