diff --git a/src/Makefile b/src/Makefile index 56f8270..e225c0c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,18 +10,18 @@ help: @echo make cleanwin32 ....... Remove object files under Win32 @echo make cleanosx ......... Remove object files under OS/X @echo make cleanos2 ......... Remove object files under OS/2 - + linux : mkdir -p obj make -C cmnllib -f Makefile.linux make -C jamlib -f Makefile.linux - make -C oslib_linux + make -C oslib_linux make -f Makefile.linux - + win32 : make -C cmnllib -f Makefile.win32 make -C jamlib -f Makefile.win32 - make -C oslib_win32 + make -C oslib_win32 make -f Makefile.win32 osx : @@ -33,16 +33,16 @@ osx : os2 : make -C cmnllib -f Makefile.os2 make -C jamlib -f Makefile.os2 - make -C oslib_os2 + make -C oslib_os2 make -f Makefile.os2 -cleanlinux : +cleanlinux : make -C cmnllib -f Makefile.linux clean make -C jamlib -f Makefile.linux clean make -C oslib_linux clean make -f Makefile.linux clean - -cleanwin32 : + +cleanwin32 : make -C cmnllib -f Makefile.win32 clean make -C jamlib -f Makefile.win32 clean make -C oslib_win32 clean @@ -54,7 +54,7 @@ cleanosx : make -C oslib_os2 clean make -f Makefile.osx clean -cleanos2 : +cleanos2 : make -C cmnllib -f Makefile.os2 clean make -C jamlib -f Makefile.os2 clean make -C oslib_os2 clean diff --git a/src/cmnllib/Makefile.osx b/src/cmnllib/Makefile.osx new file mode 100644 index 0000000..ff929bf --- /dev/null +++ b/src/cmnllib/Makefile.osx @@ -0,0 +1,17 @@ +INCDIR = ../ + +CC = clang $(CPPFLAGS) $(CFLAGS) -DPLATFORM_LINUX $(LDFLAGS) -I $(INCDIR) -Wall +AR = ar -ru +RM = rm -f + +OBJS = cmnllib.o + +cmnllib.a : $(OBJS) + $(AR) cmnllib.a $(OBJS) + +cmnllib.o: cmnllib.c + $(CC) -c cmnllib.c -o cmnllib.o + +clean : + $(RM) *.o *.a + diff --git a/src/jamlib/Makefile.osx b/src/jamlib/Makefile.osx new file mode 100644 index 0000000..c26d715 --- /dev/null +++ b/src/jamlib/Makefile.osx @@ -0,0 +1,29 @@ +CC = clang $(CPPFLAGS) $(CFLAGS) -D__LINUX__ $(LDFLAGS) -Wall +AR = ar -ru +RM = rm -f + +OBJS = crc32.o mbase.o message.o lastread.o subpack.o structrw.o + +jamlib.a : $(OBJS) + $(AR) jamlib.a $(OBJS) + +crc32.o: crc32.c jam.h + $(CC) -c crc32.c -o crc32.o + +mbase.o: mbase.c jam.h + $(CC) -c mbase.c -o mbase.o + +message.o: message.c jam.h + $(CC) -c message.c -o message.o + +lastread.o: lastread.c jam.h + $(CC) -c lastread.c -o lastread.o + +subpack.o: subpack.c jam.h + $(CC) -c subpack.c -o subpack.o + +structrw.o: structrw.c jam.h + $(CC) -c structrw.c -o structrw.o + +clean: + $(RM) *.o *.a