1# 2# Makefile for hostfs.xfs 3# 4# If you got these sources as part of STonX note: 5# - You have to copy all files of this directory into the FreeMiNT source 6# tree at "sys/xfs/hostfs". Instead of you may change top_srcdir at this 7# Makefile to "sys" directory of the MiNT source tree. 8# "make" does only work, if you do so! 9# 10# Note: You need a crosscompiler to make hostfs.xfs or a native m68k-atari-mint 11# gcc, make etc. 12# To use crosscompiling change the variables at CONFIGVARS. 13# To crosscompile even FreeMiNT, you may have to change CRLF at 14# CONFIGVARS (e.g. say "CRLF = echo crlf"). There may be additional 15# errors, because of using "flags" at some sub-Makefiles. Comment out 16# "flags"-calls at those Makefiles (resulting programms will only work 17# if you're running at least version 1.15.10 of FreeMiNT. 18# 19TARGET = hostfs.dos 20GENFILES = $(TARGET) 21 22SHELL = /bin/sh 23SUBDIRS = 24 25srcdir = . 26top_srcdir = ../.. 27subdir = metados 28 29CPU = 000 30 31default: all 32 33include $(top_srcdir)/CONFIGVARS 34 35all: $(TARGET) 36 37debug: 38 $(MAKE) DEBUG_INFO="-DDEBUG_INFO" 39 40# default overwrites 41INCLUDES = -I. -I.. -I$(top_srcdir)/natfeat 42DEFINITIONS = 43LD = $(CC) -nostdlib -Wl,--entry -Wl,_init 44LIBS = -lgcc 45 46# some little code pieces needs to be metados dependent 47MDFLAGS += $(DEBUG_INFO) 48 49CFLAGS += $(INCLUDES) 50CFLAGS += $(MDFLAGS) 51CFLAGS += -g -O2 -fomit-frame-pointer 52CFLAGS += -mshort 53CFLAGS += $(WARN) 54 55ASFLAGS = $(CFLAGS) 56 57LDFLAGS += -s 58 59CSRCS = \ 60 hostfs_nfapi.h \ 61 dosfile.c dosfile.h \ 62 dosdir.c dosdir.h \ 63 filesys.c filesys.h \ 64 k_fds.c k_fds.h \ 65 debug.c debug.h \ 66 global.h \ 67 kerinfo.h \ 68 main.c mintfake.h \ 69 mintproc.c mintproc.h \ 70 $(top_srcdir)/natfeat/natfeat.c $(top_srcdir)/natfeat/nf_ops.h \ 71 hostfs/hostfs_dev.c hostfs/hostfs_dev.h \ 72 hostfs/hostfs_xfs.c hostfs/hostfs_xfs.h \ 73 mint/strcpy.c \ 74 mint/strncpy.c \ 75 mint/strlen.c \ 76 mint/strupr.c \ 77 mint/bzero.c \ 78 mint/memcpy.c \ 79 mint/ctype.c \ 80 mint/ksprintf.c \ 81 mint/dostime.c \ 82 mint/unixtime.c \ 83 mint/unix2xbios.c \ 84 $(empty) 85 86SSRCS = \ 87 mdglue.S \ 88 $(top_srcdir)/natfeat/natfeat_asm.S \ 89 $(empty) 90 91# default definitions 92OBJS = $(patsubst %.S, %.o, $(filter %.S, $(SSRCS))) $(patsubst %.c, %.o, $(filter %.c, $(CSRCS))) 93 94$(TARGET): $(OBJS) 95 $(LD) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) 96 97clean:: 98 rm -f *.o */*.o $(top_srcdir)/natfeat/*.o $(TARGET) 99