PROGRAM = curl.exe
OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
+ifneq ($(findstring COMMAND.COM,$(SHELL)),COMMAND.COM)
+ ifneq ($(findstring CMD.EXE,$(SHELL)),CMD.EXE)
+ ifneq ($(findstring 4DOS.COM,$(SHELL)),4DOS.COM)
+ IS_UNIX_SHELL = 1
+ endif
+ endif
+endif
+
all: $(OBJ_DIR) config.h $(PROGRAM)
@echo Welcome to cURL
$(CC) -o $@ $^ $(LDFLAGS) $(EX_LIBS)
config.h:
+ifeq ($(IS_UNIX_SHELL),1)
@echo '#include "../lib/config.dos"' > $@
+else
+ @echo #include "../lib/config.dos" > $@
+endif
#
# groff 1.18+ requires "-P -c"