Rev | Line | |
---|
[1] | 1 | ########################################################################## |
---|
| 2 | # targets: # |
---|
| 3 | # all (default) : build sap2 and sapfs # |
---|
| 4 | # install : build and install sap2 and sapfs in $(HOME)/emu/sap # |
---|
| 5 | # clean : delete all rebuildable files # |
---|
| 6 | ########################################################################## |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | ################ |
---|
| 10 | # object files # |
---|
| 11 | ################ |
---|
| 12 | |
---|
| 13 | OBJ_DIR = |
---|
| 14 | OBJ_SAP = $(OBJ_DIR)sap2.o $(OBJ_DIR)libsap.o $(OBJ_DIR)lfloppy.o |
---|
| 15 | OBJ_SAPFS = $(OBJ_DIR)sapfs.o $(OBJ_DIR)libsap.o |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | ################## |
---|
| 19 | # compiler flags # |
---|
| 20 | ################## |
---|
| 21 | |
---|
| 22 | CC = gcc |
---|
| 23 | |
---|
| 24 | WFLAGS = -Wall -W |
---|
| 25 | |
---|
| 26 | OFLAGS = -O2 |
---|
| 27 | |
---|
| 28 | CFLAGS = $(WFLAGS) $(OFLAGS) |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | ################ |
---|
| 32 | # target rules # |
---|
| 33 | ################ |
---|
| 34 | |
---|
| 35 | .PHONY: all install clean |
---|
| 36 | |
---|
| 37 | all: sap2 sapfs fd2sap |
---|
| 38 | |
---|
| 39 | clean: |
---|
| 40 | rm -f sap2 sapfs fd2sap $(OBJ_DIR)*.o |
---|
| 41 | |
---|
| 42 | sap2: $(OBJ_SAP) |
---|
| 43 | $(CC) -s -o sap2 $(OBJ_SAP) |
---|
| 44 | |
---|
| 45 | sapfs: $(OBJ_SAPFS) |
---|
| 46 | $(CC) -s -o sapfs $(OBJ_SAPFS) |
---|
| 47 | |
---|
| 48 | fd2sap: |
---|
| 49 | $(CC) -s -o fd2sap fd2sap.c |
---|
| 50 | |
---|
| 51 | $(OBJ_DIR)%.o: %.c |
---|
| 52 | $(CC) -c $(CFLAGS) -o $@ $< |
---|
| 53 | |
---|
Note: See
TracBrowser
for help on using the repository browser.