[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sun-managers
Subject:    cc vs. gcc
From:       "Habib M." <stmp () hotmail ! com>
Date:       2001-02-28 19:50:07
[Download RAW message or body]

I just found out that my ssol2.6 does not have cc?. I have to get
gcc since it is free and probably can do the job. Is gcc can do
what cc was going to do in below?. Never tried gcc before.
Habib

#cat Makefile
CC = "path to cc or gcc. if gcc replace CC with GCC"
DEFS = -D_KERNEL -DSOLARIS2_6
#DEFS = -D_KERNEL

# use -xcg89 for pre-SPARC V8 cpus (eg. Sparc-Lite)
# -xcg92 better for SPARCstations 5, 10, 20
# use -xO2 when confident about the driver

# doesn't seem to like the -mt switch

#CFLAGS = -Xa -xcg92 -xO4
CFLAGS = -Xa -xO4
#CFLAGS = -Xa
#DEFS = -D_KERNEL -DDEBUG

LD = ld
LDFLAGS = -r

SRCS = mycode_io.h mycode_impl.h mycode.c
DOCS =

%.o : %.c
        $(CC) $(CFLAGS) $(DEFS) -c $<

mycode: mycode.o
        $(LD) $(LDFLAGS) mycode.o -o mycode

install: mycode
        echo "You must be superuser to install"
        cp -p mycode /usr/kernel/drv/
        add_drv -i 'SDSUmycode' -m '* 0666 bin bin' mycode

reinstall: mycode
        echo "You must be superuser to re-install"
        rem_drv mycode
        cp mycode /usr/kernel/drv/
        add_drv -i 'SDSUmycode' -m '* 0666 bin bin' mycode

clean:
        $(RM) mycode.o mycode .mycode*

pack: mycode clean
        tar cvf mycode.tar  mycode $(SRCS) Makefile $(DOCS)
        compress mycode.tar

mycode.o : mycode.c mycode_io.h mycode_impl.h

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic