mirror of
https://github.com/ascii-boxes/boxes.git
synced 2024-12-13 18:30:39 +01:00
Allow user to add flags to CFLAGS and LDFLAGS
To build on Mac OS X: `make CFLAGS_ADDTL=-m32 LDFLAGS_ADDTL=-m32`
This commit is contained in:
parent
99d38c00a9
commit
1a2cf93965
@ -46,10 +46,10 @@ ALL_FILES = $(ORIG_FILES) $(GEN_FILES) $(OTH_FILES)
|
||||
|
||||
|
||||
build: flags_$(BOXES_PLATFORM)
|
||||
$(MAKE) BOXES_PLATFORM=$(BOXES_PLATFORM) ALL_OBJ="$(ALL_OBJ)" CFLAGS_ADDTL=-O STRIP=true flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME)
|
||||
$(MAKE) BOXES_PLATFORM=$(BOXES_PLATFORM) ALL_OBJ="$(ALL_OBJ)" CFLAGS_ADDTL="-O $(CFLAGS_ADDTL)" STRIP=true flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME)
|
||||
|
||||
debug: flags_$(BOXES_PLATFORM)
|
||||
$(MAKE) BOXES_PLATFORM=$(BOXES_PLATFORM) ALL_OBJ="$(ALL_OBJ)" CFLAGS_ADDTL=-g STRIP=false flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME)
|
||||
$(MAKE) BOXES_PLATFORM=$(BOXES_PLATFORM) ALL_OBJ="$(ALL_OBJ)" CFLAGS_ADDTL="-g $(CFLAGS_ADDTL)" STRIP=false flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME)
|
||||
|
||||
boxes: $(ALL_OBJ)
|
||||
$(MAKE) -C regexp CC=$(CC) libregexp.a
|
||||
@ -63,7 +63,7 @@ boxes.exe: $(ALL_OBJ)
|
||||
|
||||
flags_unix:
|
||||
$(eval CFLAGS := -ansi -I. -Iregexp -Wall -W $(CFLAGS_ADDTL))
|
||||
$(eval LDFLAGS := -Lregexp)
|
||||
$(eval LDFLAGS := -Lregexp $(LDFLAGS_ADDTL))
|
||||
$(eval BOXES_EXECUTABLE_NAME := boxes)
|
||||
$(eval ALL_OBJ := $(GEN_SRC:.c=.o) $(ORIG_NORM:.c=.o))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user