Skip to content

Add macOS make scenario #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand All @@ -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
Expand All @@ -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
Expand Down
17 changes: 17 additions & 0 deletions src/cmnllib/Makefile.osx
Original file line number Diff line number Diff line change
@@ -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

29 changes: 29 additions & 0 deletions src/jamlib/Makefile.osx
Original file line number Diff line number Diff line change
@@ -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