mirror of
https://github.com/xboot/xfel.git
synced 2025-05-08 18:10:38 +08:00
add macos support
This commit is contained in:
parent
0be806ed14
commit
3993561f5e
4
Makefile
4
Makefile
@ -53,7 +53,7 @@ all : $(NAME)
|
||||
|
||||
$(NAME) : $(OBJS)
|
||||
@echo [LD] Linking $@
|
||||
@$(CC) $(LDFLAGS) $(LIBDIRS) -Wl,--cref,-Map=$@.map $^ -o $@ $(LIBS)
|
||||
@$(CC) $(LDFLAGS) $(LIBDIRS) -Wl $^ -o $@ $(LIBS)
|
||||
|
||||
$(SOBJS) : %.o : %.S
|
||||
@echo [AS] $<
|
||||
@ -73,4 +73,4 @@ install:
|
||||
install -Dm0644 LICENSE /usr/share/licenses/xfel/LICENSE
|
||||
|
||||
clean:
|
||||
@$(RM) $(DEPS) $(OBJS) $(NAME).map $(NAME).exe $(NAME) *~
|
||||
@$(RM) $(DEPS) $(OBJS) $(NAME).exe $(NAME) *~
|
||||
|
2
x.h
2
x.h
@ -10,6 +10,8 @@ extern "C" {
|
||||
#endif
|
||||
#if defined(__linux__) || defined(__CYGWIN__)
|
||||
# include <endian.h>
|
||||
#elif defined(__MACH__)
|
||||
# include <sys/types.h>
|
||||
#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
# include <sys/endian.h>
|
||||
#elif defined(__WINDOWS__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user