1997-08-08 04:44:13 +00:00
|
|
|
#
|
|
|
|
# Standard compilation rules for utilities (directories ./bin, ./sbin,
|
|
|
|
# ./usr.bin, ./usr.sbin). These are not used when building the libraries.
|
|
|
|
#
|
1997-11-01 19:10:37 +00:00
|
|
|
# $Id: binrules.mk,v 1.3 1997/11/01 19:10:37 gdr Exp $
|
1997-08-08 04:44:13 +00:00
|
|
|
#
|
1997-09-24 06:43:53 +00:00
|
|
|
# Devin Reade, Dave Tribby, 1997.
|
1997-08-08 04:44:13 +00:00
|
|
|
#
|
|
|
|
|
1997-09-24 06:43:53 +00:00
|
|
|
# Default target, "build," generates the program file
|
|
|
|
build: $(PROG)
|
1997-08-08 04:44:13 +00:00
|
|
|
|
1997-09-24 06:43:53 +00:00
|
|
|
# Create the main program file with a ".root" and set the stack size.
|
|
|
|
# Include standard occ options
|
|
|
|
# -a0: use .o suffix for object file
|
|
|
|
# -c: don't link after compiling
|
1997-11-01 19:10:37 +00:00
|
|
|
$(MAIN).o: $(MAIN).c
|
|
|
|
$(CC) $(CFLAGS:s/ -r / /) -a0 -c $(MAIN).c
|
1997-09-24 06:43:53 +00:00
|
|
|
|
|
|
|
# Program depends upon all the objects. Add the version resource.
|
1997-08-08 04:44:13 +00:00
|
|
|
$(PROG): $(OBJS) $(PROG).r
|
|
|
|
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LDLIBS)
|
1997-09-24 06:43:53 +00:00
|
|
|
$(CATREZ) -d $@ $(PROG).r
|
|
|
|
|
|
|
|
# Remove intermediate files. If we don't put shell meta characters in
|
|
|
|
# here, then dmake doesn't have to start up a subshell and can instead
|
|
|
|
# exec the line directly
|
1997-08-08 04:44:13 +00:00
|
|
|
clean:
|
1997-09-24 06:43:53 +00:00
|
|
|
-$(RM) -f $(OBJS)
|
1997-11-01 19:10:37 +00:00
|
|
|
-$(RM) -f $(MAIN).root
|
1997-09-24 06:43:53 +00:00
|
|
|
-$(RM) -f $(PROG).r
|
|
|
|
-$(RM) -f $(PROG).rej
|
1997-08-08 04:44:13 +00:00
|
|
|
|
1997-09-24 06:43:53 +00:00
|
|
|
# Remove intermediate files and program file
|
1997-08-08 04:44:13 +00:00
|
|
|
clobber: clean
|
|
|
|
-$(RM) $(PROG)
|