mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Make adflib build.
This commit is contained in:
1
Makefile
1
Makefile
@@ -139,6 +139,7 @@ include dep/libusbp/build.mk
|
||||
include dep/stb/build.mk
|
||||
include dep/emu/build.mk
|
||||
include dep/fatfs/build.mk
|
||||
include dep/adflib/build.mk
|
||||
include scripts/build.mk
|
||||
|
||||
include lib/build.mk
|
||||
|
||||
61
dep/adflib/adf_nativ.h
Normal file
61
dep/adflib/adf_nativ.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* adf_nativ.h
|
||||
*
|
||||
* $ID$
|
||||
*
|
||||
* This file is part of ADFLib.
|
||||
*
|
||||
* ADFLib is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ADFLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Foobar; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ADF_NATIV_H
|
||||
#define ADF_NATIV_H
|
||||
|
||||
#include<stdio.h>
|
||||
#include"adf_str.h"
|
||||
|
||||
#define NATIVE_FILE 8001
|
||||
|
||||
#ifndef BOOL
|
||||
#define BOOL int
|
||||
#endif
|
||||
|
||||
#ifndef RETCODE
|
||||
#define RETCODE int32_t
|
||||
#endif
|
||||
|
||||
struct nativeDevice{
|
||||
FILE* fd;
|
||||
};
|
||||
|
||||
struct nativeFunctions{
|
||||
/* called by adfMount() */
|
||||
RETCODE (*adfInitDevice)(struct Device*, char*,BOOL);
|
||||
/* called by adfReadBlock() */
|
||||
RETCODE (*adfNativeReadSector)(struct Device*, int32_t, int, uint8_t*);
|
||||
/* called by adfWriteBlock() */
|
||||
RETCODE (*adfNativeWriteSector)(struct Device*, int32_t, int, uint8_t*);
|
||||
/* called by adfMount() */
|
||||
BOOL (*adfIsDevNative)(char*);
|
||||
/* called by adfUnMount() */
|
||||
RETCODE (*adfReleaseDevice)();
|
||||
};
|
||||
|
||||
void adfInitNativeFct();
|
||||
|
||||
#endif /* ADF_NATIV_H */
|
||||
|
||||
/*#######################################################################################*/
|
||||
21
dep/adflib/build.mk
Normal file
21
dep/adflib/build.mk
Normal file
@@ -0,0 +1,21 @@
|
||||
ADFLIB_SRCS = \
|
||||
dep/adflib/src/adf_bitm.c \
|
||||
dep/adflib/src/adf_cache.c \
|
||||
dep/adflib/src/adf_dir.c \
|
||||
dep/adflib/src/adf_disk.c \
|
||||
dep/adflib/src/adf_dump.c \
|
||||
dep/adflib/src/adf_env.c \
|
||||
dep/adflib/src/adf_file.c \
|
||||
dep/adflib/src/adf_hd.c \
|
||||
dep/adflib/src/adf_link.c \
|
||||
dep/adflib/src/adf_raw.c \
|
||||
dep/adflib/src/adf_salv.c \
|
||||
dep/adflib/src/adf_util.c \
|
||||
|
||||
ADFLIB_OBJS = $(patsubst %.c, $(OBJDIR)/%.o, $(ADFLIB_SRCS))
|
||||
$(ADFLIB_OBJS): CFLAGS += -Idep/adflib/src -Idep/adflib
|
||||
ADFLIB_LIB = $(OBJDIR)/libadflib.a
|
||||
$(ADFLIB_LIB): $(ADFLIB_OBJS)
|
||||
ADFLIB_CFLAGS = -Idep/adflib/src
|
||||
ADFLIB_LDFLAGS = $(ADFLIB_LIB)
|
||||
|
||||
2
dep/adflib/config.h
Normal file
2
dep/adflib/config.h
Normal file
@@ -0,0 +1,2 @@
|
||||
/* empty config.h to keep the source happy */
|
||||
|
||||
@@ -85,5 +85,6 @@ $(LIBFLUXENGINE_OBJS): CFLAGS += $(LIBARCH_CFLAGS)
|
||||
$(LIBFLUXENGINE_OBJS): CFLAGS += $(LIBUSBP_CFLAGS)
|
||||
$(LIBFLUXENGINE_OBJS): CFLAGS += $(PROTO_CFLAGS)
|
||||
$(LIBFLUXENGINE_OBJS): CFLAGS += $(FATFS_CFLAGS)
|
||||
$(LIBFLUXENGINE_OBJS): CFLAGS += $(ADFLIB_CFLAGS)
|
||||
|
||||
$(call use-pkgconfig, $(LIBFLUXENGINE_LIB), $(LIBFLUXENGINE_OBJS), fmt)
|
||||
|
||||
@@ -33,6 +33,7 @@ $(call use-library, $(FLUXENGINE_BIN), $(FLUXENGINE_OBJS), LIBUSBP)
|
||||
$(call use-library, $(FLUXENGINE_BIN), $(FLUXENGINE_OBJS), PROTO)
|
||||
$(call use-library, $(FLUXENGINE_BIN), $(FLUXENGINE_OBJS), STB)
|
||||
$(call use-library, $(FLUXENGINE_BIN), $(FLUXENGINE_OBJS), FATFS)
|
||||
$(call use-library, $(FLUXENGINE_BIN), $(FLUXENGINE_OBJS), ADFLIB)
|
||||
|
||||
binaries: fluxengine$(EXT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user