To run type
make -f macosx.mk
macosx.mk
Here are my Makefiles
macosx.mk
CC=gcccompile.mk
ALLOBJ=qkdisp.o nledshwr.o nledmisc.o nledit.o nledisp.o nledio.o nledata.o nled.o
LIBS=-lcurses
CFLAGS=-O3
LDFLAGS=-s
DEFINES=-DAIX=1 -DUNIX=1 -DMACOSX=1
OBJ=o
NOLINK=-c
TOOBJ=-o
DEL=rm
include compile.mk
# TO COMPILE SOME SMALL CHANGES MUST BE DONE IN SOURCE CODE
# 1) in nled.h remove the lines which define the target system
# 2) in qkdisp.c remove the lines which define the target system
# 3) around the function beep(int n) in nledio.c wrap the entire function in a
# #if MACOSX == 0 ... #endif
all: nled cleanobj
compile: nled
cleanobj:
$(DEL) $(ALLOBJ)
cleanexe:
$(DEL) nled
clean: cleanobj cleanexe
nled: $(ALLOBJ)
$(CC) $(ALLOBJ) $(LIBS) $(LDFLAGS) $(TOOBJ) nled
qkdisp.$(OBJ): qkdisp.c nledkeys.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) qkdisp.c $(TOOBJ) qkdisp.$(OBJ)
nledshwr.$(OBJ): nledshwr.c nled.h nledvdef.h nledfdef.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) nledshwr.c $(TOOBJ) nledshwr.$(OBJ)
nledmisc.$(OBJ): nledmisc.c nled.h nledkeys.h nledvdef.h nledfdef.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) nledmisc.c $(TOOBJ) nledmisc.$(OBJ)
nledit.$(OBJ): nledit.c nled.h nledkeys.h nledvdef.h nledfdef.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) nledit.c $(TOOBJ) nledit.$(OBJ)
nledisp.$(OBJ): nledisp.c nled.h nledkeys.h nledvdef.h nledfdef.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) nledisp.c $(TOOBJ) nledisp.$(OBJ)
nledio.$(OBJ): nledio.c nled.h nledkeys.h nledvdef.h nledfdef.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) nledio.c $(TOOBJ) nledio.$(OBJ)
nledata.$(OBJ): nledata.c nled.h nledkeys.h nledfdef.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) nledata.c $(TOOBJ) nledata.$(OBJ)
nled.$(OBJ): nled.c nled.h nledkeys.h nledfdef.h
$(CC) $(CFLAGS) $(DEFINES) $(NOLINK) nled.c $(TOOBJ) nled.$(OBJ)
No comments:
Post a Comment