14 CA65_INC := $(abspath ../asminc)
15 CC65_INC := $(abspath ../include)
16 LD65_LIB := $(abspath ../lib)
17 LD65_OBJ := $(abspath ../lib)
18 LD65_CFG := $(abspath ../cfg)
20 CFLAGS += -MMD -MP -O -std=c89 -I common \
21 -Wall -Wextra -Wno-char-subscripts -Werror \
22 -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \
23 -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG)
29 .PHONY: all $(PROGS) mostlyclean clean install uninstall
37 $(RM) -r ../wrk ../bin
40 $(foreach prog,$(PROGS),$(INSTALL_recipe))
43 $(foreach prog,$(PROGS),$(UNINSTALL_recipe))
49 ln -s $(abspath ../bin/$(prog)) /usr/local/bin/$(prog)
55 define UNINSTALL_recipe
57 $(RM) /usr/local/bin/$(prog)
65 $1_OBJS := $$(patsubst %.c,../wrk/%.o,$$(wildcard $1/*.c))
67 $$($1_OBJS): | ../wrk/$1
72 DEPS += $$($1_OBJS:.o=.d)
80 $$(eval $$(call OBJS_template,$1))
82 ../bin/$1: $$($1_OBJS) ../wrk/common/common.a | ../bin
83 $$(CC) $$(LDFLAGS) -o $$@ $$^ $$(LDLIBS)
93 @$(CC) -c $(CFLAGS) -o $@ $<
98 $(eval $(call OBJS_template,common))
99 ../wrk/common/common.a: $(common_OBJS)
102 $(foreach prog,$(PROGS),$(eval $(call PROG_template,$(prog))))
110 .PHONY: all mostlyclean clean
113 msbuild cc65.sln /p:configuration=release /consoleloggerparameters:disableconsolecolor
116 $(if $(wildcard ../wrk),rmdir /s /q ..\wrk)
119 msbuild cc65.sln /p:configuration=release /consoleloggerparameters:disableconsolecolor /target:$@