mirror of
https://github.com/LIV2/libnix.git
synced 2025-12-06 00:23:08 +00:00
82 lines
1.8 KiB
Makefile
82 lines
1.8 KiB
Makefile
#### Start of system configuration section. ####
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
CC = @CC@
|
|
CPP = @CPP@
|
|
AS = @AS@
|
|
|
|
AR = @AR@
|
|
RANLIB = @RANLIB@
|
|
AWK = @AWK@
|
|
|
|
#### End system configuration section ####
|
|
|
|
ifneq ($(TARGET),clean)
|
|
include ../../sources/nix13/filelist
|
|
endif
|
|
|
|
CURDIR = $(shell pwd)
|
|
|
|
OPTIONS=-I$(srcdir)/../headers $(CFLAGS) -D__KICK13__
|
|
|
|
REDEF=-D_DOSBase=___DOSBase \
|
|
-D_UtilityBase=___UtilityBase \
|
|
-D_MathIeeeSingBasBase=___MathIeeeSingBasBase \
|
|
-D_MathIeeeSingTransBase=___MathIeeeSingTransBase \
|
|
-D_MathIeeeDoubBasBase=___MathIeeeDoubBasBase \
|
|
-D_MathIeeeDoubTransBase=___MathIeeeDoubTransBase \
|
|
-D_LocaleBase=___LocaleBase
|
|
|
|
|
|
OBJECTS2=$(OBJECTS) \
|
|
amiga/misc/ArgArray.o \
|
|
misc/swapstack.o \
|
|
nix/extra/dirent.o \
|
|
nixmain/__nocommandline.o
|
|
|
|
SUBDIRS2=$(SUBDIRS) amiga/misc misc nix/extra nixmain
|
|
|
|
%.o: %.c $(SUBDIRS2)
|
|
$(CC) $(OPTIONS) -S $(filter-out $(SUBDIRS2), $^) -o $*.S 2>&1|tee $*.err
|
|
$(CPP) -traditional $(REDEF) $*.S -o $*__2.S
|
|
$(CC) $(OPTIONS) $*__2.S -c -o $*.o
|
|
-rm $*.S $*__2.S
|
|
-if test ! -s $*.err; then rm $*.err; fi
|
|
|
|
.PHONY: all clean veryclean
|
|
|
|
all: libnix13.a
|
|
|
|
clean:
|
|
-rm -rf $(SUBDIRS2)
|
|
|
|
veryclean:
|
|
-rm -rf *
|
|
|
|
.PHONY: subdirs $(SUBDIRS2)
|
|
|
|
subdirs: $(SUBDIRS2)
|
|
|
|
$(SUBDIRS2):
|
|
mkdir -p $@
|
|
|
|
libnix13.a: subdirs $(OBJECTS2) ../../sources/nix13/Makefile ../../sources/nix13/filelist
|
|
-rm -f $@
|
|
$(AR) -q $@ $(OBJECTS2)
|
|
$(RANLIB) $@
|
|
# echo "\\$$$(V)" >>$@
|
|
|
|
amiga/misc/ArgArray.o: $(srcdir)/../amiga/misc/ArgArray.c
|
|
$(CC) $(OPTIONS) $^ -c -o amiga/misc/ArgArray.o
|
|
|
|
misc/swapstack.o: $(srcdir)/../misc/swapstack.c
|
|
$(CC) $(OPTIONS) $^ -c -o misc/swapstack.o
|
|
|
|
nix/extra/dirent.o: $(srcdir)/../nix/extra/dirent.c
|
|
$(CC) $(OPTIONS) $^ -c -o nix/extra/dirent.o
|
|
|
|
nixmain/__nocommandline.o: $(srcdir)/../nixmain/__nocommandline.c
|
|
$(CC) $(OPTIONS) $^ -c -o nixmain/__nocommandline.o
|