|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: May 2006
Città: Salerno
Messaggi: 936
|
[C++] Makefile... help!
ho scaricato un makefile, ma non riesco a capire cosa devo modificare per usarlo col borland (a riga di comando)
ho provato a sostituire g++ con bcc32 ma non funziona... ![]() Codice:
CFLAGS=-g PROGRAMS=combat ROBOTS=cylon tracker target CC=g++ -g all: $(PROGRAMS) $(ROBOTS) clean: rm -f $(PROGRAMS) $(ROBOTS) *.o core combat: combat.o $(CC) $(CFLAGS) -o $@ combat.o -lm combat.o: combat.c $(CC) $(CFLAGS) -c combat.c robots.o: robots.C robots.h g++ -c robots.C cylon: cylon.o robots.o g++ -static -o $@ cylon.o robots.o cylon.o: cylon.c robots.h g++ -c cylon.c tracker: tracker.o robots.o g++ -static -o $@ tracker.o robots.o tracker.o: tracker.c robots.h g++ -c tracker.c target: target.o robots.o g++ -static -o $@ target.o robots.o target.o: target.c robots.h g++ -c target.c |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Nov 2005
Città: TO
Messaggi: 5206
|
Quote:
__________________
Andrea, SCJP 5 (91%) - SCWCD 5 (94%) |
|
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Nov 2005
Città: TO
Messaggi: 5206
|
Makefile per applicazioni Win32 GUI/console con il compilatore BCC a linea di comando della Borland
Applicazione Win32 "console" con il BCC hello.c Codice:
#include <stdio.h>
int main (int argc, char *argv[])
{
printf ("Hello World!");
return 0;
}
Codice:
# Makefile for Win32 "console" application with BCC
# ---- debug options ----
CFLAGS=-c -d -q -w -w-par -tWC -Od -v -y -R -D_DEBUG
LFLAGS=-x -C -c -Gn -q -ap -Tpe -v
# ---- release options ----
# CFLAGS=-c -d -q -w -w-par -tWC -O2
# LFLAGS=-x -C -c -Gn -q -ap -Tpe
LIBS=cw32.lib kernel32.lib user32.lib gdi32.lib
hello.exe: hello.obj
@ilink32 $(LFLAGS) c0x32.obj hello.obj,hello.exe,,$(LIBS),,
hello.obj: hello.c
@bcc32 $(CFLAGS) -ohello.obj hello.c
clean:
@IF EXIST hello.obj DEL hello.obj
@IF EXIST hello.tds DEL hello.tds
Applicazione Win32 "GUI" con il BCC hello.c Codice:
#include <windows.h>
INT APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, INT iCmdShow)
{
MessageBox (NULL, "Hello World!", "Hello", MB_OK);
return 0;
}
Codice:
# Makefile for Win32 "GUI" application with BCC
# ---- debug options ----
CFLAGS=-c -d -q -w -w-par -tW -Od -v -y -R -D_DEBUG
LFLAGS=-x -C -c -Gn -q -aa -Tpe -v
# ---- release options ----
# CFLAGS=-c -d -q -w -w-par -tW -O2
# LFLAGS=-x -C -c -Gn -q -aa -Tpe
LIBS=cw32.lib kernel32.lib user32.lib gdi32.lib
hello.exe: hello.obj
@ilink32 $(LFLAGS) c0w32.obj hello.obj,hello.exe,,$(LIBS),,
hello.obj: hello.c
@bcc32 $(CFLAGS) -ohello.obj hello.c
clean:
@IF EXIST hello.obj DEL hello.obj
@IF EXIST hello.tds DEL hello.tds
__________________
Andrea, SCJP 5 (91%) - SCWCD 5 (94%) |
|
|
|
|
|
#4 | ||
|
Senior Member
Iscritto dal: May 2006
Città: Salerno
Messaggi: 936
|
Quote:
Quote:
|
||
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 11:33.




















