Annotation of dmsdos/src/Makefile, revision 1.1.1.3

1.1       root        1: # If you want or need to change something herein, please look approx. 30 lines
                      2: # below for the 'User Config Section'
                      3: 
                      4: ########################################################################
                      5: # The next lines are hacks for automatic detection of different kernel setups.
                      6: # These things must happen first, please don't change them here. They can be
                      7: # overridden later.
                      8: #
                      9: # we try to guess some settings from kernel configuration :) 
                     10: -include /usr/src/linux/.config
                     11: #
                     12: # guess some special flags for CPU type - used for optimization only
                     13: CPUFLAGS=
                     14: ifeq ($(CONFIG_M386),y)
                     15: CPUFLAGS= -m386 -DCPU=386 -DUSE_ASM
                     16: endif
                     17: ifeq ($(CONFIG_M486),y)
                     18: CPUFLAGS= -m486 -DCPU=486 -DUSE_ASM
                     19: endif
                     20: ifeq ($(CONFIG_M586),y)
                     21: CPUFLAGS= -m486 -DCPU=586 -DUSE_ASM
                     22: endif
1.1.1.2   root       23: # this one is new in 2.2.x kernels...
                     24: ifeq ($(CONFIG_M586TSC),y)
                     25: CPUFLAGS= -m486 -DCPU=586 -DUSE_ASM
                     26: endif
1.1       root       27: ifeq ($(CONFIG_M686),y)
                     28: CPUFLAGS= -m486 -DCPU=686 -DUSE_ASM
                     29: endif
1.1.1.2   root       30: # this one is new in 2.3.x kernels...
1.1.1.3 ! root       31: ifeq ($(CONFIG_MK6),y)
        !            32: CPUFLAGS= -m486 -DCPU=586 -DUSE_ASM
        !            33: endif
1.1.1.2   root       34: ifeq ($(CONFIG_MK7),y)
                     35: CPUFLAGS= -m486 -DCPU=686 -DUSE_ASM
                     36: endif
1.1       root       37: #
                     38: # Okay, that's it :)
                     39: ########################################################################
                     40: 
                     41: ########################################################################
                     42: # *** User Config Section ***
                     43: # Here you can look for settings to change if the code refuses to compile
                     44: # out of the box. There are so many different systems. So many versions
                     45: # of compilers. So many different bugs. :(
                     46: #
                     47: # Select compiler
                     48: CC=gcc
                     49: #
                     50: # If cpu specific optimization fails, uncomment the next line to switch it
                     51: # off - there are some gas versions around that don't like the cpu specific
                     52: # asm instructions in dmsdos...
                     53: # CPUFLAGS=
                     54: #
                     55: # Some gnu assembler versions have a bug in the syntax for the xlat 
                     56: # instruction. This enables a workaround. It should only be needed for very
                     57: # old binutils versions. I don't know for which ones :(
                     58: # CPUFLAGS+= -DGAS_XLAT_BUG
                     59: #
                     60: # The next lines should detect SMP configuration automatically.
                     61: # Comment them out or set it manually if it fails.
                     62: ifeq ($(SMP),1)
                     63: CPUFLAGS+= -D__SMP__
                     64: endif
1.1.1.2   root       65: # 2.2.x kernels have this one...
                     66: ifeq ($(CONFIG_SMP),y)
                     67: CPUFLAGS+= -D__SMP__
                     68: endif
1.1       root       69: #
                     70: # The next lines are for libc6 and enable some compatibility hacks -
                     71: # uncomment the line with -D__FOR_LIBC6 if the code does not compile
                     72: # *** Currently not used - code should compile under libc6 without hacks
                     73: LIBC6FLAGS=
                     74: #LIBC6FLAGS= -D__FOR_LIBC6
                     75: #
                     76: # CFLAGS for dmsdos module
                     77: # note: some macro expansions require at least -O
                     78: CFLAGS= -Wall -Wstrict-prototypes -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE
                     79: CFLAGS+= $(CPUFLAGS)
                     80: #
                     81: # The next lines add some stuff automatically for people using modversions
                     82: # if they fail, comment them out and set the required flags manually
                     83: ifeq ($(CONFIG_MODVERSIONS),y)
                     84: CFLAGS+= -DMODVERSIONS -include /usr/include/linux/modversions.h
                     85: endif
                     86: #
                     87: # CFLAGS for the dmsdos daemon
                     88: # note: some macro expansions require at least -O
                     89: DCFLAGS= -Wall -O3 -D__DMSDOS_DAEMON__
                     90: DCFLAGS+= $(CPUFLAGS)
                     91: #
                     92: # CFLAGS for the dmsdos library
                     93: # note: some macro expansions require at least -O
1.1.1.2   root       94: LCFLAGS= -Wall -O -ggdb -D__DMSDOS_LIB__ -DUSE_FLOCK
1.1       root       95: LCFLAGS+= $(CPUFLAGS) $(LIBC6FLAGS)
1.1.1.2   root       96: # uncomment the next line if you want a shared library
                     97: # LIB_SHARED = 1
1.1       root       98: #
                     99: # locations where to install the module, the executables and the manpages
                    100: # note: `uname -r` expands to the *currently running* kernel version - if it
                    101: # is different from that in /usr/src/linux you'd better edit the next line :)
                    102: MODULE_PREFIX=/lib/modules/`uname -r`/fs
                    103: #MODULE_PREFIX=/lib/modules/misc
                    104: EXEC_PREFIX=/usr/local/bin
                    105: #
                    106: # Okay, that's the end of the User Config Section.
                    107: ##########################################################################
                    108: 
                    109: ##########################################################################
                    110: # The rest of this file are rules how to build which programs.
                    111: 
1.1.1.2   root      112: all: dmsdos-config.h dmsdos.o dutil dmsdosd $(LIBDMSDOS) dcread dmsdosfsck \
                    113:      mcdmsdos cvflist cvftest
1.1       root      114: 
                    115: min: dmsdos-config.h dmsdos.o dutil
                    116: 
                    117: dmsdos-config.h:
                    118:        /bin/bash conf-wrapper.sh
                    119:        make dep
                    120: 
                    121: config:
                    122:        /bin/bash Configure
                    123:        make dep
                    124: 
                    125: menuconfig:
                    126:        /bin/bash Menuconfig
                    127:        make dep
                    128: 
                    129: dep:
                    130:        ./check.sh
                    131:        $(CC) -w -E -MM -D__KERNEL__ -D__MODULE__ -DMODULE dblspace*.c dstacker*.c > depend
                    132: 
                    133: depend:
                    134:        @touch depend
                    135: 
                    136: DBL_OBJS =  dblspace_compr.o dblspace_tables.o \
1.1.1.2   root      137:            dblspace_alloc.o dblspace_dec.o dblspace_virtual.o \
                    138:            dblspace_buffer.o dblspace_methsq.o \
                    139:            dblspace_chk.o dblspace_interface.o \
                    140:            dstacker_alloc.o dstacker_compr.o dstacker_dec.o \
                    141:            dblspace_fileops.o dblspace_ioctl.o
1.1       root      142: 
                    143: $(DBL_OBJS): dmsdos.h dmsdos-config.h
                    144: 
1.1.1.2   root      145: dblspace_fileops.o : dblspace_fileops.c dblspace_fileops.c-2.0.33 \
1.1.1.3 ! root      146:                     dblspace_fileops.c-2.1.80 dblspace_fileops.c-2.3.99
1.1.1.2   root      147: 
1.1       root      148: dmsdos.o: $(DBL_OBJS)
                    149:        ld -r -o dmsdos.o $(DBL_OBJS)
                    150: 
                    151: dutil: dutil.c dmsdos.h dmsdos-config.h
                    152:        $(CC) $(DCFLAGS) -o dutil dutil.c
                    153: 
                    154: DAEMON_OBJS = daemon_actions.do dblspace_compr.do dstacker_compr.do \
1.1.1.2   root      155:              dblspace_methsq.do
1.1       root      156: 
                    157: $(DAEMON_OBJS): dmsdos.h dmsdos-config.h
                    158: 
                    159: %.do: %.c ; $(CC) -o $@ $(DCFLAGS) -c $<
                    160: 
                    161: dmsdosd: $(DAEMON_OBJS)
                    162:        $(CC) -o dmsdosd $^
                    163: 
                    164: clean:
1.1.1.2   root      165:        rm -f *.o *.a *.i *.s *.lo *.do *.so *.so.* dutil dmsdosd dcread \
                    166:              dmsdosfsck cvftest cvflist mcdmsdos
1.1       root      167: 
                    168: mrproper: clean
                    169:        rm -f core *~ depend
                    170:        rm -f .config* dmsdos-config.h .menuconfig*
                    171: 
                    172: install: all
                    173:        ./check.sh
                    174:        install dmsdos.o -m 644 $(MODULE_PREFIX)/dmsdos.o
                    175:        install dutil $(EXEC_PREFIX)/dutil
                    176:        install dmsdosd $(EXEC_PREFIX)/dmsdosd
                    177:        install dmsdosfsck $(EXEC_PREFIX)/dmsdosfsck
1.1.1.2   root      178:        install mcdmsdos $(EXEC_PREFIX)/mcdmsdos
                    179:        install cvflist $(EXEC_PREFIX)/cvflist
                    180:        install cvftest $(EXEC_PREFIX)/cvftest
1.1       root      181: 
                    182: install-min: min
                    183:        ./check.sh
                    184:        install dmsdos.o $(MODULE_PREFIX)/dmsdos.o
                    185:        install dutil $(EXEC_PREFIX)/dutil
                    186: 
                    187: uninstall:
                    188:        rm -f $(MODULE_PREFIX)/dmsdos.o
                    189:        rm -f $(EXEC_PREFIX)/dutil
                    190:        rm -f $(EXEC_PREFIX)/dmsdosd
                    191:        rm -f $(EXEC_PREFIX)/dmsdosfsck
1.1.1.2   root      192:        rm -f $(EXEC_PREFIX)/mcdmsdos
                    193:        rm -f $(EXEC_PREFIX)/cvflist
                    194:        rm -f $(EXEC_PREFIX)/cvftest
1.1       root      195: 
                    196: messages:
                    197:        grep DMSDOS ../doc/messages.doc | sort -d -b -f > /tmp/messdoc
                    198:        ./listmsg.sh -LOG > /tmp/messsrc
                    199:        diff -d -U 0 -w /tmp/messdoc /tmp/messsrc | grep DMSDOS
                    200: 
                    201: LIB_OBJS =  lib_interface.lo dblspace_interface.lo dblspace_dec.lo \
1.1.1.2   root      202:            dblspace_compr.lo dblspace_methsq.lo dblspace_alloc.lo \
                    203:            dblspace_chk.lo dblspace_tables.lo dstacker_compr.lo \
                    204:            dstacker_dec.lo dstacker_alloc.lo
1.1       root      205: 
                    206: $(LIB_OBJS): dmsdos.h dmsdos-config.h lib_interface.h
                    207: 
1.1.1.2   root      208: ifndef LIB_SHARED
                    209: 
                    210: LIBDMSDOS = libdmsdos.a
                    211: 
1.1       root      212: %.lo: %.c ; $(CC) -o $@ $(LCFLAGS) -c $<
                    213: 
1.1.1.2   root      214: $(LIBDMSDOS): $(LIB_OBJS)
                    215:        ar rcs $(LIBDMSDOS) $^
                    216:        ranlib $(LIBDMSDOS)
                    217: 
                    218: else
                    219: 
                    220: %.lo: %.c ; $(CC) --shared -o $@ $(LCFLAGS) -c $<
1.1       root      221: 
1.1.1.2   root      222: LIBDMSDOS = libdmsdos.so.0.9.2
1.1       root      223: 
1.1.1.2   root      224: $(LIBDMSDOS): $(LIB_OBJS)
                    225:        ld --shared --soname=$(LIBDMSDOS) -o $(LIBDMSDOS) $^
                    226:        ln -s $(LIBDMSDOS) libdmsdos.so
1.1       root      227: 
1.1.1.2   root      228: endif
                    229: 
                    230: dcread: dcread.c $(LIBDMSDOS) dmsdos.h dmsdos-config.h
1.1       root      231:        $(CC) -Wall -ggdb -o dcread dcread.c -L. -ldmsdos
                    232: 
1.1.1.2   root      233: mcdmsdos: mcdmsdos.c $(LIBDMSDOS) dmsdos.h dmsdos-config.h
                    234:        $(CC) -Wall -ggdb -o mcdmsdos mcdmsdos.c -L. -ldmsdos
                    235: 
                    236: dmsdosfsck: dmsdosfsck.c $(LIBDMSDOS) dmsdos.h dmsdos-config.h
1.1       root      237:        $(CC) -Wall -o dmsdosfsck dmsdosfsck.c -L. -ldmsdos
                    238: 
                    239: cvftest: cvftest.c
                    240:        $(CC) -Wall -o cvftest cvftest.c
                    241: 
1.1.1.2   root      242: cvflist: cvflist.c
                    243:        $(CC) -Wall -o cvflist cvflist.c
                    244: 
1.1       root      245: -include depend

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.